From 3dd95b1311e0c49fc9588d9636c30c706888e888 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 18 Jun 2018 13:28:15 +0300 Subject: [PATCH] oggdemux: Make sure that events are writable before changing their seqnum --- ext/ogg/gstoggdemux.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index c8f251d..767f9b6 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -2404,15 +2404,19 @@ gst_ogg_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) switch (GST_EVENT_TYPE (event)) { 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); + } res = gst_ogg_demux_send_event (ogg, event); break; case GST_EVENT_FLUSH_STOP: GST_DEBUG_OBJECT (ogg, "got a flush stop event"); 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); + } res = gst_ogg_demux_send_event (ogg, event); if (ogg->pullmode || ogg->push_state != PUSH_DURATION) { /* it's starting to feel reaaaally dirty :( -- 2.7.4