# HG changeset patch # User michael # Date 1146560602 0 # Node ID 1eaa95d9e9998a99ea5e0eef619364112148b62a # Parent 30d412952107624397bbc58fd1e08d672a27f043 d10 decoding fix diff -r 30d412952107 -r 1eaa95d9e999 mpeg12.c --- a/mpeg12.c Mon May 01 00:28:36 2006 +0000 +++ b/mpeg12.c Tue May 02 09:03:22 2006 +0000 @@ -2618,10 +2618,13 @@ if(s->mb_y<= s->mb_height){ int left= s->gb.size_in_bits - get_bits_count(&s->gb); - - if(left < 0 || (left && show_bits(&s->gb, FFMIN(left, 23))) + 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)) && !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;