[x264-devel] [PATCH] Remove use of deprecated FFMS_MakeIndex

Joshua Holmer jholmer.in at gmail.com
Thu Oct 1 05:51:37 CEST 2015


FFMS_MakeIndex was deprecated in FFMS 2.21
Therefore, this patch removes the warning now produced by the compiler
Note that this bumps the FFMS version requirement to 2.21
---
 configure    | 2 +-
 input/ffms.c | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 0e9df9d..456a071 100755
--- a/configure
+++ b/configure
@@ -1033,7 +1033,7 @@ if [ "$lavf" = "auto" ] ; then
 fi
 
 if [ "$ffms" = "auto" ] ; then
-    ffms_major="2"; ffms_minor="16"; ffms_micro="2"; ffms_bump="0"
+    ffms_major="2"; ffms_minor="21"; ffms_micro="0"; ffms_bump="0"
     ffms="no"
 
     if ${cross_prefix}pkg-config --exists ffms2 2>/dev/null; then
diff --git a/input/ffms.c b/input/ffms.c
index 6a3eb6c..f2c06c2 100644
--- a/input/ffms.c
+++ b/input/ffms.c
@@ -110,13 +110,15 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
     }
     if( !idx )
     {
+        FFMS_Indexer *idxr = FFMS_CreateIndexer( src_filename, &e );
         if( opt->progress )
         {
-            idx = FFMS_MakeIndex( src_filename, 0, 0, NULL, NULL, 0, update_progress, &h->time, &e );
+            FFMS_SetProgressCallback( idxr, update_progress, &h->time );
+            idx = FFMS_DoIndexing2( idxr, 0, &e );
             fprintf( stderr, "                                            \r" );
         }
         else
-            idx = FFMS_MakeIndex( src_filename, 0, 0, NULL, NULL, 0, NULL, NULL, &e );
+            idx = FFMS_DoIndexing2( idxr, 0, &e );
         FAIL_IF_ERROR( !idx, "could not create index\n" )
         if( opt->index_file && FFMS_WriteIndex( idx_filename, idx, &e ) )
             x264_cli_log( "ffms", X264_LOG_WARNING, "could not write index file\n" );
-- 
2.6.0



More information about the x264-devel mailing list