changeset 10379:d580026275a1 libavcodec

Print error message when true interlaced VC-1 frames are encountered to inform user why decoder produces no output.
author kostya
date Sat, 10 Oct 2009 07:35:31 +0000
parents 03b0316b9ead
children 464ea00ac79e
files vc1.c vc1.h
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vc1.c	Fri Oct 09 15:38:44 2009 +0000
+++ b/vc1.c	Sat Oct 10 07:35:31 2009 +0000
@@ -781,7 +781,11 @@
 
     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:
--- a/vc1.h	Fri Oct 09 15:38:44 2009 +0000
+++ b/vc1.h	Sat Oct 10 07:35:31 2009 +0000
@@ -312,6 +312,8 @@
     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