mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
typefind: Remove code that would cause caps to be sent twice
Whenever we set typefind->caps we will also send a caps event downstream.
This commit is contained in:
parent
25fc832d49
commit
922815996f
1 changed files with 1 additions and 9 deletions
|
@ -700,7 +700,7 @@ gst_type_find_element_setcaps (GstTypeFindElement * typefind, GstCaps * caps)
|
||||||
gsize avail;
|
gsize avail;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (typefind, "Skipping typefinding, using caps from "
|
GST_DEBUG_OBJECT (typefind, "Skipping typefinding, using caps from "
|
||||||
"upstream buffer: %" GST_PTR_FORMAT, caps);
|
"upstream: %" GST_PTR_FORMAT, caps);
|
||||||
typefind->mode = MODE_NORMAL;
|
typefind->mode = MODE_NORMAL;
|
||||||
|
|
||||||
gst_type_find_element_send_cached_events (typefind);
|
gst_type_find_element_send_cached_events (typefind);
|
||||||
|
@ -966,14 +966,6 @@ gst_type_find_element_activate_src_mode (GstPad * pad, GstObject * parent,
|
||||||
* activation might happen from the streaming thread. */
|
* activation might happen from the streaming thread. */
|
||||||
gst_pad_pause_task (typefind->sink);
|
gst_pad_pause_task (typefind->sink);
|
||||||
res = gst_pad_activate_mode (typefind->sink, mode, active);
|
res = gst_pad_activate_mode (typefind->sink, mode, active);
|
||||||
if (active && res && typefind->caps) {
|
|
||||||
GstCaps *caps;
|
|
||||||
GST_OBJECT_LOCK (typefind);
|
|
||||||
caps = gst_caps_ref (typefind->caps);
|
|
||||||
GST_OBJECT_UNLOCK (typefind);
|
|
||||||
res = gst_pad_set_caps (typefind->src, caps);
|
|
||||||
gst_caps_unref (caps);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue