diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-02-23 18:27:47 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-02-23 18:27:47 +0200 |
commit | 49f46319097fd723909a6eeb749ead9fbd497806 (patch) | |
tree | ebf6477aef1b7e3113fde666c8a3880053eed4ad /ext | |
parent | 9b2e1f9f360756e65cf137d3ef0f119bb73508c6 (diff) | |
download | gstreamer-plugins-good-49f46319097fd723909a6eeb749ead9fbd497806.tar.gz |
gst: Handle gst_pad_get_current_caps() returning NULL gracefully
Diffstat (limited to 'ext')
-rw-r--r-- | ext/dv/gstdvdec.c | 3 | ||||
-rw-r--r-- | ext/gdk_pixbuf/gstgdkpixbufdec.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index 4fd01c9a2..89911d70c 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -479,6 +479,9 @@ gst_dvdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) GstCaps *caps; caps = gst_pad_get_current_caps (dvdec->srcpad); + if (!caps) + goto not_negotiated; + gst_dvdec_negotiate_pool (dvdec, caps, &dvdec->vinfo); gst_caps_unref (caps); } diff --git a/ext/gdk_pixbuf/gstgdkpixbufdec.c b/ext/gdk_pixbuf/gstgdkpixbufdec.c index 36cfbc027..589e74fa3 100644 --- a/ext/gdk_pixbuf/gstgdkpixbufdec.c +++ b/ext/gdk_pixbuf/gstgdkpixbufdec.c @@ -228,6 +228,8 @@ gst_gdk_pixbuf_dec_setup_pool (GstGdkPixbufDec * filter, GstVideoInfo * info) guint size, min, max; target = gst_pad_get_current_caps (filter->srcpad); + if (!target) + return FALSE; /* try to get a bufferpool now */ /* find a pool for the negotiated caps now */ |