[x264-devel] commit: Fix regression in rev1549 (Yusuke Nakamura )

git at videolan.org git at videolan.org
Tue Dec 7 09:15:48 CET 2010


x264 | branch: master | Yusuke Nakamura <muken.the.vfrmaniac at gmail.com> | Sun Dec  5 09:31:01 2010 +0900| [fba116fc1245b940ef4e95da5527ea5bea8ed031] | committer: Jason Garrett-Glaser 

Fix regression in rev1549
Skip auto timebase denominator generation when generated timebase denominator exceeds UINT32_MAX.
Also fix double free.

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

 input/timecode.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/input/timecode.c b/input/timecode.c
index 4d9540d..3aea325 100644
--- a/input/timecode.c
+++ b/input/timecode.c
@@ -209,7 +209,10 @@ static int parse_tcfile( FILE *tcfile_in, timecode_hnd_t *h, video_info_t *info
             }
         }
         if( fpss )
+        {
             free( fpss );
+            fpss = NULL;
+        }
 
         h->assume_fps = assume_fps;
         h->last_timecode = timecodes[timecodes_num - 1];
@@ -263,7 +266,7 @@ static int parse_tcfile( FILE *tcfile_in, timecode_hnd_t *h, video_info_t *info
             for( num = 0; num < timecodes_num - 1; num++ )
             {
                 fpss[num] = 1 / (timecodes[num + 1] - timecodes[num]);
-                if( h->timebase_den >= 0 )
+                if( h->auto_timebase_den )
                 {
                     int i = 1;
                     uint64_t fps_num, fps_den;
@@ -289,6 +292,7 @@ static int parse_tcfile( FILE *tcfile_in, timecode_hnd_t *h, video_info_t *info
                 if( try_mkv_timebase_den( fpss, h, timecodes_num - 1 ) < 0 )
                     goto fail;
             free( fpss );
+            fpss = NULL;
         }
 
         if( timecodes_num > 1 )



More information about the x264-devel mailing list