diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-05 12:51:22 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-24 10:38:52 +0100 |
commit | d2fd2921e3427918cfc91a45a96d044079461e69 (patch) | |
tree | 70f1029c7281de2eaa718b535aa969444f76c45b /libavcodec | |
parent | 2d825946a3970e566fa41829eb758f94169c4a0e (diff) | |
download | ffmpeg-d2fd2921e3427918cfc91a45a96d044079461e69.tar.gz |
avcodec/cdgraphics: Use ff_set_dimensions()
Fixes: Timeout (17 sec -> 65 milli sec)
Fixes: 13264/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-5711167941509120
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9a9f0e239c1c6f5c96cc90ba673087f86ca1eabc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cdgraphics.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index 87ad5e79f4..da6fb7af03 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -80,11 +80,8 @@ static av_cold int cdg_decode_init(AVCodecContext *avctx) return AVERROR(ENOMEM); cc->transparency = -1; - avctx->width = CDG_FULL_WIDTH; - avctx->height = CDG_FULL_HEIGHT; avctx->pix_fmt = AV_PIX_FMT_PAL8; - - return 0; + return ff_set_dimensions(avctx, CDG_FULL_WIDTH, CDG_FULL_HEIGHT); } static void cdg_border_preset(CDGraphicsContext *cc, uint8_t *data) |