# HG changeset patch # User michael # Date 1216438422 0 # Node ID def12c3c77428cbd9cd56a00abbdc18624c2a931 # Parent 094536cc2e18b0fb0bab63b7f48c7ce2b3ea49f7 Do not forget marking disposed delayed pics as unused. Fixes issue335 diff -r 094536cc2e18 -r def12c3c7742 h264.c --- a/h264.c Sat Jul 19 03:17:44 2008 +0000 +++ b/h264.c Sat Jul 19 03:33:42 2008 +0000 @@ -7866,6 +7866,8 @@ s->avctx->has_b_frames++; } + if(out_of_order || pics > s->avctx->has_b_frames) + out->reference &= ~DELAYED_PIC_REF; if(pics <= s->avctx->has_b_frames || out_of_order) out = NULL; @@ -7877,7 +7879,6 @@ if(out){ *data_size = sizeof(AVFrame); - out->reference &= ~DELAYED_PIC_REF; h->outputed_poc = out->poc; } #endif