mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 13:25:56 +00:00
buffer: avoid < -1 sizes
This commit is contained in:
parent
541d79d886
commit
5be6ad56a5
1 changed files with 3 additions and 2 deletions
|
@ -821,11 +821,12 @@ gst_buffer_resize (GstBuffer * buffer, gssize offset, gssize size)
|
|||
GstMemory *mem;
|
||||
|
||||
g_return_if_fail (gst_buffer_is_writable (buffer));
|
||||
g_return_if_fail (size >= -1);
|
||||
|
||||
bufsize = gst_buffer_get_sizes (buffer, &bufoffs, &bufmax);
|
||||
|
||||
GST_CAT_LOG (GST_CAT_BUFFER, "trim %p %" G_GSSIZE_FORMAT "-%" G_GSIZE_FORMAT
|
||||
" size:%" G_GSIZE_FORMAT " offs:%" G_GSSIZE_FORMAT " max:%"
|
||||
GST_CAT_LOG (GST_CAT_BUFFER, "trim %p %" G_GSSIZE_FORMAT "-%" G_GSSIZE_FORMAT
|
||||
" size:%" G_GSIZE_FORMAT " offs:%" G_GSIZE_FORMAT " max:%"
|
||||
G_GSIZE_FORMAT, buffer, offset, size, bufsize, bufoffs, bufmax);
|
||||
|
||||
/* we can't go back further than the current offset or past the end of the
|
||||
|
|
Loading…
Reference in a new issue