diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-14 13:04:54 +0100 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-11-26 01:35:46 +0100 |
commit | 983e63b49018f93e8fd32fdd999bc4be6afbb8f5 (patch) | |
tree | 1693ac578878f377a0ce7356fe89e558edf33b41 | |
parent | bf2f7115d9d7cb2a9948a600f71c66976ce33f22 (diff) | |
download | ffmpeg-983e63b49018f93e8fd32fdd999bc4be6afbb8f5.tar.gz |
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@niedermayer.cc>
(cherry picked from commit ccba8aaff2ef5649495ae48bc5c90bd8ff32e6f3)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r-- | libavcodec/avrndec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c index 5e40d664dc..695c4912f8 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]) { |