]> granicus.if.org Git - libx264/commitdiff
disposable frames shouldn't get their own coded_frame_num.
authorLoren Merritt <pengvado@videolan.org>
Sun, 2 Oct 2005 04:03:06 +0000 (04:03 +0000)
committerLoren Merritt <pengvado@videolan.org>
Sun, 2 Oct 2005 04:03:06 +0000 (04:03 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@309 df754926-b1dd-0310-bc7b-ec298dee348c

encoder/encoder.c

index caccf6600d46a585bb7419a2ce7a7e32a247d9ab..8a55d7a388664d4f84b15515e7368288dc14ccdc 100644 (file)
@@ -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 );