mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
video-info: And change the overflow check to not actually overflow itself
This commit is contained in:
parent
681d97aed7
commit
3d7a566640
1 changed files with 2 additions and 2 deletions
|
@ -684,8 +684,8 @@ fill_planes (GstVideoInfo * info)
|
|||
for (i = 0; i < GST_VIDEO_INFO_N_COMPONENTS (info); i++)
|
||||
bpp += GST_VIDEO_INFO_COMP_DEPTH (info, i);
|
||||
bpp = GST_ROUND_UP_8 (bpp) / 8;
|
||||
if (GST_ROUND_UP_128 ((guint64) width) * ((guint64) height) * bpp >=
|
||||
G_MAXUINT) {
|
||||
if (bpp > 0 && GST_ROUND_UP_128 ((guint64) width) * ((guint64) height) >=
|
||||
G_MAXUINT / bpp) {
|
||||
GST_ERROR ("Frame size %ux%u would overflow", info->width, info->height);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue