mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
oggdemux: Make sure that events are writable before changing their seqnum
This commit is contained in:
parent
af3f307277
commit
3dd95b1311
1 changed files with 6 additions and 2 deletions
|
@ -2404,15 +2404,19 @@ gst_ogg_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_FLUSH_START:
|
case GST_EVENT_FLUSH_START:
|
||||||
if (ogg->seqnum != GST_SEQNUM_INVALID)
|
if (ogg->seqnum != GST_SEQNUM_INVALID) {
|
||||||
|
event = gst_event_make_writable (event);
|
||||||
gst_event_set_seqnum (event, ogg->seqnum);
|
gst_event_set_seqnum (event, ogg->seqnum);
|
||||||
|
}
|
||||||
res = gst_ogg_demux_send_event (ogg, event);
|
res = gst_ogg_demux_send_event (ogg, event);
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
GST_DEBUG_OBJECT (ogg, "got a flush stop event");
|
GST_DEBUG_OBJECT (ogg, "got a flush stop event");
|
||||||
ogg_sync_reset (&ogg->sync);
|
ogg_sync_reset (&ogg->sync);
|
||||||
if (ogg->seqnum != GST_SEQNUM_INVALID)
|
if (ogg->seqnum != GST_SEQNUM_INVALID) {
|
||||||
|
event = gst_event_make_writable (event);
|
||||||
gst_event_set_seqnum (event, ogg->seqnum);
|
gst_event_set_seqnum (event, ogg->seqnum);
|
||||||
|
}
|
||||||
res = gst_ogg_demux_send_event (ogg, event);
|
res = gst_ogg_demux_send_event (ogg, event);
|
||||||
if (ogg->pullmode || ogg->push_state != PUSH_DURATION) {
|
if (ogg->pullmode || ogg->push_state != PUSH_DURATION) {
|
||||||
/* it's starting to feel reaaaally dirty :(
|
/* it's starting to feel reaaaally dirty :(
|
||||||
|
|
Loading…
Reference in a new issue