mpeg2dec: use default pad accept-caps handling
authorThiago Santos <thiagoss@osg.samsung.com>
Sat, 15 Aug 2015 14:46:59 +0000 (11:46 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Sat, 15 Aug 2015 14:54:11 +0000 (11:54 -0300)
Avoids useless check of downstream caps when handling an
accept-caps query

ext/mpeg2dec/gstmpeg2dec.c

index 1c76cfa..ac91565 100644 (file)
@@ -135,6 +135,9 @@ gst_mpeg2dec_init (GstMpeg2dec * mpeg2dec)
 {
   gst_video_decoder_set_packetized (GST_VIDEO_DECODER (mpeg2dec), TRUE);
   gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (mpeg2dec), TRUE);
+  gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
+      (mpeg2dec), TRUE);
+  GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (mpeg2dec));
 
   /* initialize the mpeg2dec acceleration */
 }