aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-19 23:28:39 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-06-10 02:13:10 +0200
commit81ba3b1b916692e24d00aed6b673f43ebe13d639 (patch)
tree89049de75656f74a77e2e6ef12ea37ca4bcf7b84
parent9c10ef55b0aa97894b841076c3b893f42235b89a (diff)
downloadffmpeg-81ba3b1b916692e24d00aed6b673f43ebe13d639.tar.gz
avcodec/dnxhddec: Check that the frame is interlaced before using cur_field
Fixes Ticket4227 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 2c660e34cf3c2b77cd2bef6f292920334dfd9192) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/dnxhddec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index 61d769570e..720f1b11cf 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -312,7 +312,7 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame, int x, int
dest_u = frame->data[1] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1));
dest_v = frame->data[2] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1));
- if (ctx->cur_field) {
+ if (frame->interlaced_frame && ctx->cur_field) {
dest_y += frame->linesize[0];
dest_u += frame->linesize[1];
dest_v += frame->linesize[2];