diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-05-01 12:31:19 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-05-01 12:31:19 +0000 |
commit | 714127812c7194126c8b466e8ac9fe5e02c44d58 (patch) | |
tree | 069f9be593516b2cf38df16bbbb9197ed1751e56 /libavcodec/mpeg12.c | |
parent | 45ccc61a066671a7c2250393cac89e739bddb863 (diff) | |
download | ffmpeg-714127812c7194126c8b466e8ac9fe5e02c44d58.tar.gz |
Ignore first entry of intra matrixes if it is invalid.
Fixes pink.mpg / issue1046.
Originally committed as revision 18724 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index d5635b11ac..019dc81085 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; |