Remove calls to gst_pad_has_current_caps() which then go on to call
gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just
use gst_pad_get_current_caps() and check for NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=759539
GST_OBJECT_LOCK (deinterlace);
if (deinterlace->reconfigure) {
+ GstCaps *caps;
+
if ((gint) deinterlace->new_mode != -1)
deinterlace->mode = deinterlace->new_mode;
deinterlace->new_mode = -1;
deinterlace->reconfigure = FALSE;
GST_OBJECT_UNLOCK (deinterlace);
- if (gst_pad_has_current_caps (deinterlace->srcpad)) {
- GstCaps *caps;
-
- caps = gst_pad_get_current_caps (deinterlace->sinkpad);
+ if ((caps = gst_pad_get_current_caps (deinterlace->srcpad))) {
gst_ffmpegdeinterlace_sink_setcaps (deinterlace->sinkpad, caps);
gst_caps_unref (caps);
}