theoradec: add another assert to check the buffer size

If the buffer has no video meta then the meta is created from the local
data. In this case, the other asserts don't actually check anything. So add
another one to ensure that the buffer is actually large enough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4600>
This commit is contained in:
Michael Olbrich 2021-06-23 12:11:28 +02:00
parent 9dd6b08fcc
commit 802b3b9898

View file

@ -710,6 +710,8 @@ theora_handle_image (GstTheoraDec * dec, th_ycbcr_buffer buf,
g_assert (vmeta->format == dec->output_state->info.finfo->format);
g_assert (vmeta->width == dec->info.frame_width);
g_assert (vmeta->height == dec->info.frame_height);
g_assert (gst_buffer_get_size (frame->output_buffer) >=
dec->uncropped_info.size);
cmeta = gst_buffer_add_video_crop_meta (frame->output_buffer);