From b34e0ba91cc01511c395c1d4ee44ec1ccb8df165 Mon Sep 17 00:00:00 2001 From: Mohammed Sameer Date: Wed, 30 Jul 2014 20:53:53 +0300 Subject: [PATCH] streamsynchronizer: don't unset DISCONT flag Unsetting DISCONT flag means we need to copy the buffer. This copy operation mandates that all GstMemory should be copy-able which is not always the case https://bugzilla.gnome.org/show_bug.cgi?id=727409 --- gst/playback/gststreamsynchronizer.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c index 3997d1be66..9e06ee7666 100644 --- a/gst/playback/gststreamsynchronizer.c +++ b/gst/playback/gststreamsynchronizer.c @@ -66,7 +66,6 @@ typedef struct gboolean wait; /* TRUE if waiting/blocking */ gboolean new_stream; - gboolean drop_discont; gboolean is_eos; /* TRUE if EOS was received */ gboolean seen_data; @@ -244,7 +243,6 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, stream->is_eos = FALSE; stream->stream_start_seqnum = seqnum; stream->group_id = group_id; - stream->drop_discont = TRUE; if (!have_group_id) { /* Check if this belongs to a stream that is already there, @@ -417,7 +415,6 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, stream->is_eos = FALSE; stream->wait = FALSE; stream->new_stream = FALSE; - stream->drop_discont = FALSE; stream->seen_data = FALSE; g_cond_broadcast (&stream->stream_finish_cond); } @@ -550,15 +547,6 @@ gst_stream_synchronizer_sink_chain (GstPad * pad, GstObject * parent, if (stream) { stream->seen_data = TRUE; - if (stream->drop_discont) { - if (GST_BUFFER_IS_DISCONT (buffer)) { - GST_DEBUG_OBJECT (pad, "removing DISCONT from buffer %p", buffer); - buffer = gst_buffer_make_writable (buffer); - GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT); - } - stream->drop_discont = FALSE; - } - if (stream->segment.format == GST_FORMAT_TIME && GST_CLOCK_TIME_IS_VALID (timestamp)) { GST_LOG_OBJECT (pad, @@ -851,7 +839,6 @@ gst_stream_synchronizer_change_state (GstElement * element, gst_segment_init (&stream->segment, GST_FORMAT_UNDEFINED); stream->wait = FALSE; stream->new_stream = FALSE; - stream->drop_discont = FALSE; stream->is_eos = FALSE; } GST_STREAM_SYNCHRONIZER_UNLOCK (self);