From: Yasuhiro Ikeda Date: Mon, 1 Aug 2011 23:59:15 +0000 (+0900) Subject: Avoid using deprecated libavformat functions X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1dd4b85fc700db5ec4380e20c2d73882808b3763;p=libx264 Avoid using deprecated libavformat functions Replace av_find_stream_info with avformat_find_stream_info. Now requires libavformat 53.3.0 or newer. --- diff --git a/configure b/configure index dc1179e3..f1a43b51 100755 --- a/configure +++ b/configure @@ -760,7 +760,7 @@ if [ "$lavf" = "auto" ] ; then done fi LAVF_LIBS="-L. $LAVF_LIBS" - if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "avformat_open_input(0,0,0,0); avcodec_open2(0,0,0);" ; then + if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "avformat_find_stream_info(0,0); avcodec_open2(0,0,0);" ; then if [ "$swscale" = "yes" ]; then lavf="yes" else diff --git a/input/lavf.c b/input/lavf.c index ee773b05..1073ee5a 100644 --- a/input/lavf.c +++ b/input/lavf.c @@ -154,7 +154,7 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c FAIL_IF_ERROR( avformat_open_input( &h->lavf, psz_filename, format, &options ), "could not open input file\n" ) if( options ) av_dict_free( &options ); - FAIL_IF_ERROR( av_find_stream_info( h->lavf ) < 0, "could not find input stream info\n" ) + FAIL_IF_ERROR( avformat_find_stream_info( h->lavf, NULL ) < 0, "could not find input stream info\n" ) int i = 0; while( i < h->lavf->nb_streams && h->lavf->streams[i]->codec->codec_type != AVMEDIA_TYPE_VIDEO )