mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 17:09:48 +00:00
baseparse: Reset metadata for reverse playback fragment buffers
Don't let the adapter leak uncontrollable values. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5720>
This commit is contained in:
parent
a2533d2556
commit
e5b6be0f70
1 changed files with 5 additions and 1 deletions
|
@ -2289,6 +2289,10 @@ gst_base_parse_handle_buffer (GstBaseParse * parse, GstBuffer * buffer,
|
|||
outbuf = gst_buffer_make_writable (outbuf);
|
||||
GST_BUFFER_PTS (outbuf) = pts;
|
||||
GST_BUFFER_DTS (outbuf) = dts;
|
||||
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET_NONE;
|
||||
GST_BUFFER_DURATION (outbuf) = GST_CLOCK_TIME_NONE;
|
||||
GST_BUFFER_OFFSET_END (outbuf) = GST_BUFFER_OFFSET_NONE;
|
||||
GST_BUFFER_FLAGS (outbuf) = 0;
|
||||
parse->priv->buffers_head =
|
||||
g_slist_prepend (parse->priv->buffers_head, outbuf);
|
||||
outbuf = NULL;
|
||||
|
@ -2736,7 +2740,7 @@ gst_base_parse_finish_frame (GstBaseParse * parse, GstBaseParseFrame * frame,
|
|||
GST_BUFFER_OFFSET (dest) = GST_BUFFER_OFFSET (src);
|
||||
GST_BUFFER_DURATION (dest) = GST_BUFFER_DURATION (src);
|
||||
GST_BUFFER_OFFSET_END (dest) = GST_BUFFER_OFFSET_END (src);
|
||||
GST_MINI_OBJECT_FLAGS (dest) = GST_MINI_OBJECT_FLAGS (src);
|
||||
GST_BUFFER_FLAGS (dest) = GST_BUFFER_FLAGS (src);
|
||||
} else {
|
||||
gst_adapter_flush (parse->priv->adapter, size);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue