mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +00:00
streamsync: only remove DISCONT when needed
Check if the buffer is DISCONT before making a potentially expensive copy to unset the DISCONT flag.
This commit is contained in:
parent
20806e4c16
commit
b26f35c3a4
1 changed files with 5 additions and 2 deletions
|
@ -506,8 +506,11 @@ gst_stream_synchronizer_sink_chain (GstPad * pad, GstObject * parent,
|
||||||
if (stream) {
|
if (stream) {
|
||||||
stream->seen_data = TRUE;
|
stream->seen_data = TRUE;
|
||||||
if (stream->drop_discont) {
|
if (stream->drop_discont) {
|
||||||
buffer = gst_buffer_make_writable (buffer);
|
if (GST_BUFFER_IS_DISCONT (buffer)) {
|
||||||
GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
|
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;
|
stream->drop_discont = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue