openh264dec: Uninitializing the decoder can't fail and will always return 0 == cmResu...
authorSebastian Dröge <sebastian@centricular.com>
Thu, 2 Jul 2015 12:15:05 +0000 (14:15 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 2 Jul 2015 12:16:05 +0000 (14:16 +0200)
... but when we cast cmResultSuccess to a gboolean it will be FALSE, and make
GstVideoDecoder::stop() fail for no reason.

ext/openh264/gstopenh264dec.cpp

index e8fb3d2bbc057ec2ff93203688aff33109f6a162..3e37d01ac645dfc3888b6d63b421b7e77103d5dc 100644 (file)
@@ -207,10 +207,9 @@ static gboolean
 gst_openh264dec_stop (GstVideoDecoder * decoder)
 {
   GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder);
-  gint ret = TRUE;
 
   if (openh264dec->priv->decoder) {
-    ret = openh264dec->priv->decoder->Uninitialize ();
+    openh264dec->priv->decoder->Uninitialize ();
     WelsDestroyDecoder (openh264dec->priv->decoder);
     openh264dec->priv->decoder = NULL;
   }
@@ -221,7 +220,7 @@ gst_openh264dec_stop (GstVideoDecoder * decoder)
   }
   openh264dec->priv->width = openh264dec->priv->height = 0;
 
-  return ret;
+  return TRUE;
 }
 
 static gboolean