From: Loren Merritt Date: Sun, 2 Oct 2005 04:03:06 +0000 (+0000) Subject: disposable frames shouldn't get their own coded_frame_num. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bab1d61dd306199747dd8f949bde2a49b20c6f70;p=libx264 disposable frames shouldn't get their own coded_frame_num. git-svn-id: svn://svn.videolan.org/x264/trunk@309 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/encoder/encoder.c b/encoder/encoder.c index caccf660..8a55d7a3 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -1295,11 +1295,8 @@ do_encode: if( i_slice_type == SLICE_TYPE_B ) x264_macroblock_bipred_init( h ); - /* increase frame num but only once for B frame */ - if( i_slice_type != SLICE_TYPE_B || h->sh.i_type != SLICE_TYPE_B ) - { + if( h->fenc->b_kept_as_ref ) h->i_frame_num++; - } /* ------------------------ Create slice header ----------------------- */ x264_slice_init( h, i_nal_type, i_slice_type, i_global_qp );