mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
adaptivedemux: Handle find_stream_for_pad() without g_assert_not_reached() if no pad is found
Happens e.g. if a RECONFIGURE event is sent from downstream while we're switching pads at this very moment. The old pad is gone and the stream has a new pad. https://bugzilla.gnome.org/show_bug.cgi?id=764404
This commit is contained in:
parent
d6f7ea88bb
commit
2125124755
1 changed files with 4 additions and 4 deletions
|
@ -1092,7 +1092,6 @@ gst_adaptive_demux_find_stream_for_pad (GstAdaptiveDemux * demux, GstPad * pad)
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_assert_not_reached ();
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1241,6 +1240,7 @@ gst_adaptive_demux_src_event (GstPad * pad, GstObject * parent,
|
||||||
gboolean update;
|
gboolean update;
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
GstSegment oldsegment;
|
GstSegment oldsegment;
|
||||||
|
GstAdaptiveDemuxStream *stream = NULL;
|
||||||
|
|
||||||
GST_INFO_OBJECT (demux, "Received seek event");
|
GST_INFO_OBJECT (demux, "Received seek event");
|
||||||
|
|
||||||
|
@ -1318,9 +1318,8 @@ gst_adaptive_demux_src_event (GstPad * pad, GstObject * parent,
|
||||||
* use the one that received the event as the 'leading'
|
* use the one that received the event as the 'leading'
|
||||||
* one to do the snap seek.
|
* one to do the snap seek.
|
||||||
*/
|
*/
|
||||||
if (IS_SNAP_SEEK (flags) && demux_class->stream_seek) {
|
if (IS_SNAP_SEEK (flags) && demux_class->stream_seek && (stream =
|
||||||
GstAdaptiveDemuxStream *stream =
|
gst_adaptive_demux_find_stream_for_pad (demux, pad))) {
|
||||||
gst_adaptive_demux_find_stream_for_pad (demux, pad);
|
|
||||||
GstClockTime ts;
|
GstClockTime ts;
|
||||||
GstSeekFlags stream_seek_flags = flags;
|
GstSeekFlags stream_seek_flags = flags;
|
||||||
|
|
||||||
|
@ -1359,6 +1358,7 @@ gst_adaptive_demux_src_event (GstPad * pad, GstObject * parent,
|
||||||
GST_DEBUG_OBJECT (demux, "Adapted snap seek to %" GST_PTR_FORMAT,
|
GST_DEBUG_OBJECT (demux, "Adapted snap seek to %" GST_PTR_FORMAT,
|
||||||
event);
|
event);
|
||||||
}
|
}
|
||||||
|
stream = NULL;
|
||||||
|
|
||||||
gst_segment_do_seek (&demux->segment, rate, format, flags, start_type,
|
gst_segment_do_seek (&demux->segment, rate, format, flags, start_type,
|
||||||
start, stop_type, stop, &update);
|
start, stop_type, stop, &update);
|
||||||
|
|
Loading…
Reference in a new issue