[FFmpeg-cvslog] avsdec: Set dimensions instead of relying on the demuxer.
Michael Niedermayer
git at videolan.org
Fri Apr 20 18:29:28 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 20 17:42:18 2012 +0200| [1df49142bab1b7bccd11392aa9e819e297d21a6e] | committer: Michael Niedermayer
avsdec: Set dimensions instead of relying on the demuxer.
This fixes out of array writes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1df49142bab1b7bccd11392aa9e819e297d21a6e
---
libavcodec/avs.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index 17d4e10..801e1bc 100644
--- a/libavcodec/avs.c
+++ b/libavcodec/avs.c
@@ -162,6 +162,7 @@ static av_cold int avs_decode_init(AVCodecContext * avctx)
AvsContext *const avs = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_PAL8;
avcodec_get_frame_defaults(&avs->picture);
+ avcodec_set_dimensions(avctx, 318, 198);
return 0;
}
More information about the ffmpeg-cvslog
mailing list