Mercurial > libavcodec.hg
changeset 7309:4d3c6cd51003 libavcodec
Drop out of order pics even if bitstream_restriction_flag is set.
author | michael |
---|---|
date | Sat, 19 Jul 2008 02:44:17 +0000 |
parents | 29319d07aeb4 |
children | 033d10927d45 |
files | h264.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Sat Jul 19 02:43:23 2008 +0000 +++ b/h264.c Sat Jul 19 02:44:17 2008 +0000 @@ -7861,10 +7861,12 @@ } out_of_order = !cross_idr && prev && out->poc < prev->poc; + + if(prev && pics <= s->avctx->has_b_frames || out_of_order) + out = prev; + if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames >= h->sps.num_reorder_frames) { } - else if(prev && pics <= s->avctx->has_b_frames) - out = prev; else if((out_of_order && pics-1 == s->avctx->has_b_frames && pics < 15) || (s->low_delay && ((!cross_idr && prev && out->poc > prev->poc + 2) @@ -7874,8 +7876,6 @@ s->avctx->has_b_frames++; out = prev; } - else if(out_of_order) - out = prev; if(out_of_order || pics > s->avctx->has_b_frames){ for(i=out_idx; h->delayed_pic[i]; i++)