changeset 9588:b0e7d5ced43b libavcodec

Ignore first entry of intra matrixes if it is invalid. Fixes pink.mpg / issue1046.
author michael
date Fri, 01 May 2009 12:31:19 +0000
parents 54f2b18af736
children 3f7496cd7cab
files mpeg12.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12.c	Fri May 01 12:17:25 2009 +0000
+++ b/mpeg12.c	Fri May 01 12:31:19 2009 +0000
@@ -1480,6 +1480,10 @@
             av_log(s->avctx, AV_LOG_ERROR, "matrix damaged\n");
             return -1;
         }
+        if(intra && i==0 && v!=8){
+            av_log(s->avctx, AV_LOG_ERROR, "intra matrix invalid, ignoring\n");
+            v= 8; // needed by pink.mpg / issue1046
+        }
         matrix0[j] = v;
         if(matrix1)
             matrix1[j] = v;