# HG changeset patch # User michael # Date 1216437191 0 # Node ID f9eaaadcd611b52811910fe730e0ada5b5ba660a # Parent b5dacf4fc65b694289140a9599db20df8d47dacd simplify diff -r b5dacf4fc65b -r f9eaaadcd611 h264.c --- a/h264.c Sat Jul 19 02:54:54 2008 +0000 +++ b/h264.c Sat Jul 19 03:13:11 2008 +0000 @@ -7855,9 +7855,6 @@ out_of_order = !cross_idr && out->poc < h->outputed_poc; - if(pics <= s->avctx->has_b_frames || out_of_order) - out = NULL; - if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames >= h->sps.num_reorder_frames) { } else if((out_of_order && pics-1 == s->avctx->has_b_frames && pics < 15) @@ -7867,8 +7864,10 @@ { s->low_delay = 0; s->avctx->has_b_frames++; - out= NULL; - } + } + + if(pics <= s->avctx->has_b_frames || out_of_order) + out = NULL; if(out_of_order || pics > s->avctx->has_b_frames){ for(i=out_idx; h->delayed_pic[i]; i++)