[FFmpeg-cvslog] avcodec/dnxhddec: Check that the frame is interlaced before using cur_field
Michael Niedermayer
git at videolan.org
Tue Apr 7 13:07:33 CEST 2015
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 19 23:28:39 2015 +0100| [3ce32f640115547909e062736885d1062233a67a] | committer: Michael Niedermayer
avcodec/dnxhddec: Check that the frame is interlaced before using cur_field
Fixes Ticket4227
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 2c660e34cf3c2b77cd2bef6f292920334dfd9192)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ce32f640115547909e062736885d1062233a67a
---
libavcodec/dnxhddec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index f00d866..8999240 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -349,7 +349,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 + 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];
More information about the ffmpeg-cvslog
mailing list