[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec mpeg12.c,1.250,1.251

Michael Niedermayer CVS michael
Tue May 2 11:03:25 CEST 2006


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv19353

Modified Files:
	mpeg12.c 
Log Message:
d10 decoding fix


Index: mpeg12.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpeg12.c,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -d -r1.250 -r1.251
--- mpeg12.c	8 Mar 2006 11:43:09 -0000	1.250
+++ mpeg12.c	2 May 2006 09:03:22 -0000	1.251
@@ -2618,10 +2618,13 @@
 
             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;





More information about the ffmpeg-cvslog mailing list