mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
dataurisrc: 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
a5eee1e28a
commit
fd42320ec1
1 changed files with 2 additions and 3 deletions
|
@ -177,9 +177,8 @@ gst_data_uri_src_get_caps (GstBaseSrc * basesrc, GstCaps * filter)
|
|||
GstCaps *caps;
|
||||
|
||||
GST_OBJECT_LOCK (src);
|
||||
if (gst_pad_has_current_caps (GST_BASE_SRC_PAD (basesrc)))
|
||||
caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (basesrc));
|
||||
else
|
||||
caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (basesrc));
|
||||
if (!caps)
|
||||
caps = gst_caps_new_any ();
|
||||
GST_OBJECT_UNLOCK (src);
|
||||
|
||||
|
|
Loading…
Reference in a new issue