mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
dashdemux: avoid assertion when splitting buffer
Pass size=-1 as is if that is the case instead of subtracting the offset. Otherwise we have an invalid size passed for that buffer.
This commit is contained in:
parent
ed21506896
commit
53451500ee
1 changed files with 1 additions and 1 deletions
|
@ -1316,7 +1316,7 @@ _gst_buffer_split (GstBuffer * buffer, gint offset, gsize size)
|
|||
{
|
||||
GstBuffer *newbuf = gst_buffer_copy_region (buffer,
|
||||
GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_META
|
||||
| GST_BUFFER_COPY_MEMORY, offset, size - offset);
|
||||
| GST_BUFFER_COPY_MEMORY, offset, size == -1 ? size : size - offset);
|
||||
|
||||
gst_buffer_resize (buffer, 0, offset);
|
||||
|
||||
|
|
Loading…
Reference in a new issue