msdkdec: Correct return value of GstVideoDecoder::flush()
authorSeungha Yang <seungha.yang@navercorp.com>
Thu, 2 Jan 2020 03:22:07 +0000 (12:22 +0900)
committerSeungha Yang <seungha.yang@navercorp.com>
Thu, 2 Jan 2020 03:22:07 +0000 (12:22 +0900)
Use boolean instead of GstFlowReturn as declared.
Note that since base class does not check return value of GstVideoDecoder::flush(),
this would not cause any change of behavior.

sys/msdk/gstmsdkdec.c

index cad4a61..7e456a4 100644 (file)
@@ -1500,8 +1500,11 @@ static gboolean
 gst_msdkdec_flush (GstVideoDecoder * decoder)
 {
   GstMsdkDec *thiz = GST_MSDKDEC (decoder);
+  GstFlowReturn ret;
+
+  ret = gst_msdkdec_drain (GST_VIDEO_DECODER_CAST (thiz));
 
-  return gst_msdkdec_drain (GST_VIDEO_DECODER_CAST (thiz));
+  return ret == GST_FLOW_OK;
 }
 
 static GstFlowReturn