diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2019-03-20 21:38:04 -0300 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2019-03-21 00:40:53 +0000 |
commit | ebb0527e75aebddde0cf3272aa9e495e5587d28d (patch) | |
tree | 80f0c23ef9a4a73ef23238a7e7cd8512bc2fe84d /gst | |
parent | 33b587de1d02d34c8243fb8c8d2df99278df73b4 (diff) | |
download | gstreamer-plugins-bad-ebb0527e75aebddde0cf3272aa9e495e5587d28d.tar.gz |
mxfdemux: Avoid possible NULL caps 'dereferencing'
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mxf/mxfdemux.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index eefdf8173..f6e5ac048 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -1658,10 +1658,12 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad, pad->current_essence_track_position = pad->current_component_start; pad_caps = gst_pad_get_current_caps (GST_PAD_CAST (pad)); - if (!gst_caps_is_equal (pad_caps, pad->current_essence_track->caps)) { + if (!pad_caps + || !gst_caps_is_equal (pad_caps, pad->current_essence_track->caps)) { gst_pad_set_caps (GST_PAD_CAST (pad), pad->current_essence_track->caps); } - gst_caps_unref (pad_caps); + if (pad_caps) + gst_caps_unref (pad_caps); if (update) { if (pad->tags) { |