summaryrefslogtreecommitdiff
path: root/libavcodec/avrndec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-11-14 13:04:54 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-14 13:06:25 +0100
commitccba8aaff2ef5649495ae48bc5c90bd8ff32e6f3 (patch)
tree2af6ad4542778b4f3ef32ff4bbd395413bb0b438 /libavcodec/avrndec.c
parent6f520ce1a6c6bc8467e96a2d1d9f6dab88c210ca (diff)
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>
Diffstat (limited to 'libavcodec/avrndec.c')
-rw-r--r--libavcodec/avrndec.c2
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]) {