mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +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;
|
GstMemory *mem;
|
||||||
|
|
||||||
g_return_if_fail (gst_buffer_is_writable (buffer));
|
g_return_if_fail (gst_buffer_is_writable (buffer));
|
||||||
|
g_return_if_fail (size >= -1);
|
||||||
|
|
||||||
bufsize = gst_buffer_get_sizes (buffer, &bufoffs, &bufmax);
|
bufsize = gst_buffer_get_sizes (buffer, &bufoffs, &bufmax);
|
||||||
|
|
||||||
GST_CAT_LOG (GST_CAT_BUFFER, "trim %p %" G_GSSIZE_FORMAT "-%" G_GSIZE_FORMAT
|
GST_CAT_LOG (GST_CAT_BUFFER, "trim %p %" G_GSSIZE_FORMAT "-%" G_GSSIZE_FORMAT
|
||||||
" size:%" G_GSIZE_FORMAT " offs:%" G_GSSIZE_FORMAT " max:%"
|
" size:%" G_GSIZE_FORMAT " offs:%" G_GSIZE_FORMAT " max:%"
|
||||||
G_GSIZE_FORMAT, buffer, offset, size, bufsize, bufoffs, bufmax);
|
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
|
/* we can't go back further than the current offset or past the end of the
|
||||||
|
|
Loading…
Reference in a new issue