From 2e3caed26d8eab1aee34f97a1f6d4590f357b17c Mon Sep 17 00:00:00 2001 From: Henrik Gramner Date: Wed, 10 Jun 2020 03:21:24 +0200 Subject: [PATCH] lavf: Update to the new API for iterating demuxers --- autocomplete.c | 4 ++-- configure | 2 +- input/lavf.c | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/autocomplete.c b/autocomplete.c index 516d9f21..76c7f71f 100644 --- a/autocomplete.c +++ b/autocomplete.c @@ -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 } diff --git a/configure b/configure index d6c45a6d..f2a3f17e 100755 --- 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 diff --git a/input/lavf.c b/input/lavf.c index 7a064eb3..a304b536 100644 --- a/input/lavf.c +++ b/input/lavf.c @@ -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:"; -- 2.40.0