aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-19 23:28:39 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-21 01:52:53 +0100
commit61dbd3f3d09a6b569c41946a4c07dac0f21d413a (patch)
tree83f597f7caebe37b82661570c03fdad640d0bac0 /libavcodec
parent38d6ff31b7a5556731ace24fdc41cbc7b9f536e3 (diff)
downloadffmpeg-61dbd3f3d09a6b569c41946a4c07dac0f21d413a.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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dnxhddec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index 06800746d1..a8cf0800aa 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -363,7 +363,7 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame,
dest_u = frame->data[1] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444));
dest_v = frame->data[2] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444));
- 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];