mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
avdeinterlace: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()
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
This commit is contained in:
parent
4930a1f461
commit
20586e9f2d
1 changed files with 3 additions and 4 deletions
|
@ -404,16 +404,15 @@ gst_ffmpegdeinterlace_chain (GstPad * pad, GstObject * parent,
|
|||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue