mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-13 10:55:34 +00:00
streamsplitter: Keep srcpad alive while querying peer
This commit is contained in:
parent
372eddf00e
commit
b940cba826
1 changed files with 3 additions and 0 deletions
|
@ -285,6 +285,8 @@ resync:
|
||||||
while (tmp) {
|
while (tmp) {
|
||||||
GstPad *srcpad = (GstPad *) tmp->data;
|
GstPad *srcpad = (GstPad *) tmp->data;
|
||||||
|
|
||||||
|
/* Ensure srcpad doesn't get destroyed while we query peer */
|
||||||
|
gst_object_ref (srcpad);
|
||||||
STREAMS_UNLOCK (stream_splitter);
|
STREAMS_UNLOCK (stream_splitter);
|
||||||
if (res) {
|
if (res) {
|
||||||
GstCaps *peercaps = gst_pad_peer_query_caps (srcpad, filter);
|
GstCaps *peercaps = gst_pad_peer_query_caps (srcpad, filter);
|
||||||
|
@ -294,6 +296,7 @@ resync:
|
||||||
res = gst_pad_peer_query_caps (srcpad, filter);
|
res = gst_pad_peer_query_caps (srcpad, filter);
|
||||||
}
|
}
|
||||||
STREAMS_LOCK (stream_splitter);
|
STREAMS_LOCK (stream_splitter);
|
||||||
|
gst_object_unref (srcpad);
|
||||||
|
|
||||||
if (G_UNLIKELY (cookie != stream_splitter->cookie)) {
|
if (G_UNLIKELY (cookie != stream_splitter->cookie)) {
|
||||||
if (res)
|
if (res)
|
||||||
|
|
Loading…
Reference in a new issue