aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-05-02 09:03:22 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-05-02 09:03:22 +0000
commit7923a3f904b419857f0d0b468910acddf5352cad (patch)
tree830d6f3786583540e455e99f589b7880b0f4c3b3 /libavcodec
parenta20da52cbfc40ffc4b662a996bc7acd5ef587c38 (diff)
downloadffmpeg-7923a3f904b419857f0d0b468910acddf5352cad.tar.gz
d10 decoding fix
Originally committed as revision 5341 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg12.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 148523f06d..1973b917a7 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -2618,10 +2618,13 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
if(s->mb_y<<field_pic >= s->mb_height){
int left= s->gb.size_in_bits - get_bits_count(&s->gb);
+ int is_d10= s->chroma_format==2 && s->pict_type==I_TYPE && avctx->profile==0 && avctx->level==5
+ && s->intra_dc_precision == 2 && s->q_scale_type == 1 && s->alternate_scan == 0
+ && s->progressive_frame == 0 /* vbv_delay == 0xBBB || 0xE10*/;
- if(left < 0 || (left && show_bits(&s->gb, FFMIN(left, 23)))
+ if(left < 0 || (left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10)
|| (avctx->error_resilience >= FF_ER_AGGRESSIVE && left>8)){
- av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d\n", left);
+ av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n", left, show_bits(&s->gb, FFMIN(left, 23)));
return -1;
}else
goto eos;