[FFmpeg-cvslog] avcodec/avrndec: Use the AVFrame format instead of the context
Michael Niedermayer
git at videolan.org
Sat Nov 14 13:17:52 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Nov 14 13:04:54 2015 +0100| [ccba8aaff2ef5649495ae48bc5c90bd8ff32e6f3] | committer: Michael Niedermayer
avcodec/avrndec: Use the AVFrame format instead of the context
Fixes out of array read
Fixes: 20dd01398dee0f6d83d7e5410a2ae8eb/signal_sigsegv_39eeb1f_4001_62efbdf1c60748dabf1ec310b59525fd.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ccba8aaff2ef5649495ae48bc5c90bd8ff32e6f3
---
libavcodec/avrndec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c
index 5e40d66..695c491 100644
--- a/libavcodec/avrndec.c
+++ b/libavcodec/avrndec.c
@@ -113,7 +113,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
int shift = p->height - avctx->height;
int subsample_h, subsample_v;
- av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &subsample_h, &subsample_v);
+ av_pix_fmt_get_chroma_sub_sample(p->format, &subsample_h, &subsample_v);
p->data[0] += p->linesize[0] * shift;
if (p->data[2]) {
More information about the ffmpeg-cvslog
mailing list