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/5286>
This commit is contained in:
Nicolas Dufresne 2023-09-05 16:15:19 -04:00 committed by GStreamer Marge Bot
parent 2f3fea33ca
commit 65350b601e

View file

@ -1303,6 +1303,9 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer,
group->planes[i].bytesused, i, group->buffer.flags, group->planes[i].bytesused, i, group->buffer.flags,
GST_TIME_ARGS (timestamp), pool->num_queued, outbuf, old_buffer_state); 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 /* Ensure our offset matches the expected plane size, or image size if
* there is only one memory */ * there is only one memory */
if (group->n_mem == 1) { if (group->n_mem == 1) {