v4l2: bufferpool: Do not resize compressed buffer

Avoid resizing compressed buffer to their maximum size. This fixes a
regression that caused valid but very large streams to be generated.

Fixes #2953

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5319>
This commit is contained in:
Nicolas Dufresne 2023-09-05 16:15:19 -04:00 committed by Tim-Philipp Müller
parent 2bd21a6f40
commit 914e752015

View file

@ -1298,6 +1298,9 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer,
group->planes[i].bytesused, i, group->buffer.flags,
GST_TIME_ARGS (timestamp), pool->num_queued, outbuf, old_buffer_state);
if (GST_VIDEO_INFO_FORMAT (&pool->caps_info) == GST_VIDEO_FORMAT_ENCODED)
break;
/* Ensure our offset matches the expected plane size, or image size if
* there is only one memory */
if (group->n_mem == 1) {