comparison h264.c @ 11249:6f17564ec228 libavcodec

Try to set has_b_frames in codec init if we know everything alraedy. This fixes some issues with the first few timestamps.
author michael
date Tue, 23 Feb 2010 01:08:54 +0000
parents 926dde10e50d
children c12d6c6c027e
comparison
equal deleted inserted replaced
11248:926dde10e50d 11249:6f17564ec228
914 h->nal_length_size = ((*(((char*)(avctx->extradata))+4))&0x03)+1; 914 h->nal_length_size = ((*(((char*)(avctx->extradata))+4))&0x03)+1;
915 } else { 915 } else {
916 h->is_avc = 0; 916 h->is_avc = 0;
917 if(decode_nal_units(h, s->avctx->extradata, s->avctx->extradata_size) < 0) 917 if(decode_nal_units(h, s->avctx->extradata, s->avctx->extradata_size) < 0)
918 return -1; 918 return -1;
919 }
920 if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames < h->sps.num_reorder_frames){
921 s->avctx->has_b_frames = h->sps.num_reorder_frames;
922 s->low_delay = 0;
919 } 923 }
920 924
921 return 0; 925 return 0;
922 } 926 }
923 927