ffmpegenc: properly handle caps event
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 30 Jun 2011 07:20:11 +0000 (09:20 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 30 Jun 2011 07:20:11 +0000 (09:20 +0200)
... which comes down to unconditionally eating incoming caps event,
since that one could never correctly describe the setup for downstream
elements.

ext/ffmpeg/gstffmpegenc.c

index 58f6eef..e5707b8 100644 (file)
@@ -1158,11 +1158,12 @@ gst_ffmpegenc_event_sink (GstPad * pad, GstEvent * event)
     }
     case GST_EVENT_CAPS:{
       GstCaps *caps;
+      gboolean ret;
+
       gst_event_parse_caps (event, &caps);
-      if (!gst_ffmpegenc_setcaps (ffmpegenc, caps)) {
-        gst_event_unref (event);
-        return FALSE;
-      }
+      ret = gst_ffmpegenc_setcaps (ffmpegenc, caps);
+      gst_event_unref (event);
+      return ret;
       break;
     }
     default: