mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
valve: Correctly set the DISCONT flag after dropping buffers
This commit is contained in:
parent
37e02eb7c7
commit
473be88d5d
1 changed files with 9 additions and 8 deletions
|
@ -190,18 +190,19 @@ gst_valve_chain (GstPad * pad, GstBuffer * buffer)
|
|||
|
||||
GST_OBJECT_LOCK (valve);
|
||||
drop = valve->drop;
|
||||
|
||||
if (!drop && valve->discont) {
|
||||
buffer = gst_buffer_make_metadata_writable (buffer);
|
||||
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
|
||||
valve->discont = FALSE;
|
||||
}
|
||||
GST_OBJECT_UNLOCK (valve);
|
||||
|
||||
if (drop)
|
||||
if (drop) {
|
||||
gst_buffer_unref (buffer);
|
||||
else
|
||||
valve->discont = TRUE;
|
||||
} else {
|
||||
if (valve->discont) {
|
||||
buffer = gst_buffer_make_metadata_writable (buffer);
|
||||
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
|
||||
}
|
||||
|
||||
ret = gst_pad_push (valve->srcpad, buffer);
|
||||
}
|
||||
|
||||
|
||||
/* Ignore errors if "drop" was changed while the thread was blocked
|
||||
|
|
Loading…
Reference in a new issue