comparison cavsdec.c @ 11179:9a793cb05a85 libavcodec

add heuristic to discern the old sample clips from streams encoded with rm52j encoder, a marker_bit has been added in the I-Frame syntax
author stefang
date Mon, 15 Feb 2010 16:43:45 +0000
parents d69eaf40d1b8
children 8a4984c5cacc
comparison
equal deleted inserted replaced
11178:fda40558e98a 11179:9a793cb05a85
481 return -1; 481 return -1;
482 } else { 482 } else {
483 h->pic_type = FF_I_TYPE; 483 h->pic_type = FF_I_TYPE;
484 if(get_bits1(&s->gb)) 484 if(get_bits1(&s->gb))
485 skip_bits(&s->gb,24);//time_code 485 skip_bits(&s->gb,24);//time_code
486 /* old sample clips were all progressive and no low_delay,
487 bump stream revision if detected otherwise */
488 if((s->low_delay) || !(show_bits(&s->gb,9) & 1))
489 h->stream_revision = 1;
490 /* similarly test top_field_first and repeat_first_field */
491 else if(show_bits(&s->gb,11) & 3)
492 h->stream_revision = 1;
493 if(h->stream_revision > 0)
494 skip_bits(&s->gb,1); //marker_bit
486 } 495 }
487 /* release last B frame */ 496 /* release last B frame */
488 if(h->picture.data[0]) 497 if(h->picture.data[0])
489 s->avctx->release_buffer(s->avctx, (AVFrame *)&h->picture); 498 s->avctx->release_buffer(s->avctx, (AVFrame *)&h->picture);
490 499