avcodec/dvbsubdec: Use av_image_check_size2()
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 9 Jun 2017 21:04:30 +0000 (23:04 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 9 Jun 2017 22:48:07 +0000 (00:48 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/dvbsubdec.c

index b7ed0dc..bc16eb7 100644 (file)
@@ -1157,7 +1157,7 @@ static int dvbsub_parse_region_segment(AVCodecContext *avctx,
     region->height = AV_RB16(buf);
     buf += 2;
 
-    ret = av_image_check_size(region->width, region->height, 0, avctx);
+    ret = av_image_check_size2(region->width, region->height, avctx->max_pixels, AV_PIX_FMT_PAL8, 0, avctx);
     if (ret < 0) {
         region->width= region->height= 0;
         return ret;