[x264-devel] commit: Fix 10l in API change (Jason Garrett-Glaser )

git version control git at videolan.org
Thu Sep 24 17:46:41 CEST 2009


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Thu Sep 24 08:40:45 2009 -0700| [496d79dfcb90066f0254e07d593471f2c885a153] | committer: Jason Garrett-Glaser 

Fix 10l in API change
frame_num was set to 1, not 0, for the first frame.  This broke spec compliance.
Didn't actually seem to cause any problems though except for breaking decoding on Quicktime.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=496d79dfcb90066f0254e07d593471f2c885a153
---

 encoder/encoder.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/encoder/encoder.c b/encoder/encoder.c
index 872436c..9dfe397 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -1787,9 +1787,6 @@ int     x264_encoder_encode( x264_t *h,
     if( h->sh.i_type == SLICE_TYPE_B )
         x264_macroblock_bipred_init( h );
 
-    if( i_nal_ref_idc != NAL_PRIORITY_DISPOSABLE )
-        h->i_frame_num++;
-
     /* ---------------------- Write the bitstream -------------------------- */
     /* Init bitstream context */
     h->out.i_nal = 0;
@@ -1859,6 +1856,9 @@ int     x264_encoder_encode( x264_t *h,
     /* ------------------------ Create slice header  ----------------------- */
     x264_slice_init( h, i_nal_type, i_global_qp );
 
+    if( i_nal_ref_idc != NAL_PRIORITY_DISPOSABLE )
+        h->i_frame_num++;
+
     /* Write frame */
     if( h->param.i_threads > 1 )
     {



More information about the x264-devel mailing list