From 53451500ee70d63ce961afc8837ce1215cbb5611 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Fri, 29 May 2015 09:01:29 -0300 Subject: [PATCH] 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. --- ext/dash/gstdashdemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index 618c7a8839..aafb39c02e 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -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);