oggdemux: Don't push new packets if there is a pending seek
There was a race condition where the demuxer would seek back to beginning after determining the duration and while that seek was in progress one pad would attempt to push a new buffer downstream, leading to a critical warning in gst_pad_push(). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8785>
This commit is contained in:
parent
db17f54253
commit
c4bfa73391
@ -1288,9 +1288,19 @@ gst_ogg_pad_stream_out (GstOggPad * pad, gint npackets)
|
|||||||
GstFlowReturn result = GST_FLOW_OK;
|
GstFlowReturn result = GST_FLOW_OK;
|
||||||
gboolean done = FALSE;
|
gboolean done = FALSE;
|
||||||
GstOggDemux *ogg;
|
GstOggDemux *ogg;
|
||||||
|
gboolean drop;
|
||||||
|
|
||||||
ogg = pad->ogg;
|
ogg = pad->ogg;
|
||||||
|
|
||||||
|
GST_PUSH_LOCK (ogg);
|
||||||
|
drop = (ogg->seek_event_drop_till != GST_SEQNUM_INVALID);
|
||||||
|
GST_PUSH_UNLOCK (ogg);
|
||||||
|
if (drop) {
|
||||||
|
GST_DEBUG_OBJECT (ogg,
|
||||||
|
"Not pushing new packets until the pending seek is over");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
while (!done) {
|
while (!done) {
|
||||||
int ret;
|
int ret;
|
||||||
ogg_packet packet;
|
ogg_packet packet;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user