avvidenc: Make sure to fixate caps before setting them on the pad
authorSebastian Dröge <sebastian@centricular.com>
Sat, 21 Jun 2014 16:29:32 +0000 (18:29 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 21 Jun 2014 16:29:32 +0000 (18:29 +0200)
After the recent addition of negotiation support for MPEG4 part 2
profiles via caps it can happen that the generated caps at this
point still contain multiple profiles. For example if downstream
does not care. Just fixate anything here and use those caps.

ext/libav/gstavvidenc.c

index b2c2458..95b0a0a 100644 (file)
@@ -463,7 +463,7 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
     gst_caps_unref (icaps);
     goto unsupported_codec;
   }
-  icaps = gst_caps_truncate (icaps);
+  icaps = gst_caps_fixate (icaps);
 
   GST_DEBUG_OBJECT (ffmpegenc, "codec flags 0x%08x", ffmpegenc->context->flags);