Mercurial > libavcodec.hg
changeset 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 | 4a6bf3fbf367 |
files | h264.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Tue Feb 23 01:07:39 2010 +0000 +++ b/h264.c Tue Feb 23 01:08:54 2010 +0000 @@ -917,6 +917,10 @@ if(decode_nal_units(h, s->avctx->extradata, s->avctx->extradata_size) < 0) return -1; } + if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames < h->sps.num_reorder_frames){ + s->avctx->has_b_frames = h->sps.num_reorder_frames; + s->low_delay = 0; + } return 0; }