unsigned int planes = c->planes;
unsigned char *planemap = c->planemap;
-
- /* no supplementary picture */
- if (buf_size == 0)
- return 0;
-
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
c->pic.data[0] = NULL;
- // 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;
}