Mercurial > libavcodec.hg
comparison mpeg12.c @ 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 | b8357dc014b0 |
comparison
equal
deleted
inserted
replaced
9587:54f2b18af736 | 9588:b0e7d5ced43b |
---|---|
1478 int v = get_bits(&s->gb, 8); | 1478 int v = get_bits(&s->gb, 8); |
1479 if(v==0){ | 1479 if(v==0){ |
1480 av_log(s->avctx, AV_LOG_ERROR, "matrix damaged\n"); | 1480 av_log(s->avctx, AV_LOG_ERROR, "matrix damaged\n"); |
1481 return -1; | 1481 return -1; |
1482 } | 1482 } |
1483 if(intra && i==0 && v!=8){ | |
1484 av_log(s->avctx, AV_LOG_ERROR, "intra matrix invalid, ignoring\n"); | |
1485 v= 8; // needed by pink.mpg / issue1046 | |
1486 } | |
1483 matrix0[j] = v; | 1487 matrix0[j] = v; |
1484 if(matrix1) | 1488 if(matrix1) |
1485 matrix1[j] = v; | 1489 matrix1[j] = v; |
1486 } | 1490 } |
1487 return 0; | 1491 return 0; |