From a5ed877783e67bb1d4bc34ac54e2770137e1ad8a Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Sat, 15 Aug 2015 12:55:49 -0300 Subject: videodecoders: use default pad accept-caps handling Avoids useless check of downstream caps when handling an accept-caps query Elements: daaladec, libde265dec, openjpegdec, rsvgdec, schrodec, webpdec, pnmdec, vmncdec, openexrdec --- gst/pnm/gstpnmdec.c | 4 ++++ gst/vmnc/vmncdec.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'gst') diff --git a/gst/pnm/gstpnmdec.c b/gst/pnm/gstpnmdec.c index b4bf3d2e8..6963e5e60 100644 --- a/gst/pnm/gstpnmdec.c +++ b/gst/pnm/gstpnmdec.c @@ -108,6 +108,10 @@ gst_pnmdec_init (GstPnmdec * s) /* Initialize decoder */ s->buf = NULL; gst_pnmdec_flush (s); + + gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST + (s), TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (s)); } static GstFlowReturn diff --git a/gst/vmnc/vmncdec.c b/gst/vmnc/vmncdec.c index 54a42ed08..34e63c7bc 100644 --- a/gst/vmnc/vmncdec.c +++ b/gst/vmnc/vmncdec.c @@ -105,6 +105,9 @@ gst_vmnc_dec_class_init (GstVMncDecClass * klass) static void gst_vmnc_dec_init (GstVMncDec * dec) { + gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST + (dec), TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (dec)); } static gboolean -- cgit v1.2.1