]> granicus.if.org Git - libx264/commitdiff
lavf: Update to the new API for iterating demuxers
authorHenrik Gramner <henrik@gramner.com>
Wed, 10 Jun 2020 01:21:24 +0000 (03:21 +0200)
committerAnton Mitrofanov <bugmaster@narod.ru>
Thu, 2 Jul 2020 17:08:51 +0000 (19:08 +0200)
autocomplete.c
configure
input/lavf.c

index 516d9f21ee1887bf9b629fcc12e1ebd81c284119..76c7f71f422e3144e22ff777b42c798334a94943 100644 (file)
@@ -331,8 +331,8 @@ int x264_cli_autocomplete( const char *prev, const char *cur )
     OPT( "--input-fmt" )
     {
 #if HAVE_LAVF
-        av_register_all();
-        for( const AVInputFormat *f = NULL; (f = av_iformat_next( f )); )
+        void *i = NULL;
+        for( const AVInputFormat *f; (f = av_demuxer_iterate( &i )); )
             suggest_token( f->name, ',' );
 #endif
     }
index d6c45a6d7fb83774009e562238ab1c3c015c58c6..f2a3f17ec07c7cb238ceab95f02b9100f5ad1516 100755 (executable)
--- a/configure
+++ b/configure
@@ -1154,7 +1154,7 @@ if [ "$lavf" = "auto" ] ; then
         done
     fi
 
-    if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "av_register_all();" ; then
+    if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "av_demuxer_iterate(0);" ; then
         if cc_check libavcodec/avcodec.h "$LAVF_CFLAGS $LAVF_LIBS" "avcodec_send_packet(0,0);" ; then
             lavf="yes"
         else
index 7a064eb34c9b9ad7b1122e7371ee8ed04c2ccaad..a304b5363ef1d427ed6b1baa74a21a4849afd0ee 100644 (file)
@@ -168,7 +168,6 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
     lavf_hnd_t *h = calloc( 1, sizeof(lavf_hnd_t) );
     if( !h )
         return -1;
-    av_register_all();
     if( !strcmp( psz_filename, "-" ) )
         psz_filename = "pipe:";