mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
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:
parent
9dd6b08fcc
commit
802b3b9898
1 changed files with 2 additions and 0 deletions
|
@ -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->format == dec->output_state->info.finfo->format);
|
||||||
g_assert (vmeta->width == dec->info.frame_width);
|
g_assert (vmeta->width == dec->info.frame_width);
|
||||||
g_assert (vmeta->height == dec->info.frame_height);
|
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);
|
cmeta = gst_buffer_add_video_crop_meta (frame->output_buffer);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue