From 9e553f7acc2f378389a37af214ba5f1a4d99365f Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 10 Oct 2009 07:35:31 +0000 Subject: [PATCH] Print error message when true interlaced VC-1 frames are encountered to inform user why decoder produces no output. Originally committed as revision 20196 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/vc1.c | 6 +++++- libavcodec/vc1.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index ec6a660ad9..648541e2b5 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -781,7 +781,11 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) if(v->interlace){ v->fcm = decode012(gb); - if(v->fcm) return -1; // interlaced frames/fields are not implemented + if(v->fcm){ + if(!v->warn_interlaced++) + av_log(v->s.avctx, AV_LOG_ERROR, "Interlaced frames/fields support is not implemented\n"); + return -1; + } } switch(get_unary(gb, 0, 4)) { case 0: diff --git a/libavcodec/vc1.h b/libavcodec/vc1.h index e90feb2984..d5f0e05465 100644 --- a/libavcodec/vc1.h +++ b/libavcodec/vc1.h @@ -312,6 +312,8 @@ typedef struct VC1Context{ uint8_t closed_entry; ///< Closed entry point flag (CLOSED_ENTRY syntax element) int parse_only; ///< Context is used within parser + + int warn_interlaced; } VC1Context; /** Find VC-1 marker in buffer