Commit b26f35c3 authored by Wim Taymans's avatar Wim Taymans
Browse files

streamsync: only remove DISCONT when needed

Check if the buffer is DISCONT before making a potentially expensive copy to
unset the DISCONT flag.
parent 20806e4c
......@@ -506,8 +506,11 @@ gst_stream_synchronizer_sink_chain (GstPad * pad, GstObject * parent,
if (stream) {
stream->seen_data = TRUE;
if (stream->drop_discont) {
buffer = gst_buffer_make_writable (buffer);
GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment