From 268d3b11e5852ef8a33017a2fafefbc4fcb7701f Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 1 May 2009 12:31:19 +0000 Subject: [PATCH] Ignore first entry of intra matrixes if its invalid. Fixes pink.mpg / issue1046. git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18724 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavcodec/mpeg12.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index d5635b11a..019dc8108 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1480,6 +1480,10 @@ static int load_matrix(MpegEncContext *s, uint16_t matrix0[64], uint16_t matrix1 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; -- 2.39.2