mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-10-12 02:47:26 +08:00
Use avcodec_check_dimensions instead of custom hack
Originally committed as revision 3836 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -640,9 +640,7 @@ static int decode_init(AVCodecContext *avctx)
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FIXME: find a better way to prevent integer overflow
|
||||
if (((unsigned int)avctx->width > 32000) || ((unsigned int)avctx->height > 32000)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Bad image size (w = %d, h = %d).\n", avctx->width, avctx->height);
|
||||
if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user