]> git.sesse.net Git - x264/commitdiff
Avoid using deprecated libavformat functions
authorYasuhiro Ikeda <wipple625@gmail.com>
Mon, 1 Aug 2011 23:59:15 +0000 (08:59 +0900)
committerFiona Glaser <fiona@x264.com>
Fri, 5 Aug 2011 21:42:22 +0000 (14:42 -0700)
Replace av_find_stream_info with avformat_find_stream_info.
Now requires libavformat 53.3.0 or newer.

configure
input/lavf.c

index dc1179e3e0080429a7b592c6da67921a33406371..f1a43b5165898d975b55f7723f57992b60386326 100755 (executable)
--- 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
index ee773b056e826c125ddc330d8686794626bfade6..1073ee5a08e12860d614b987586a24fdd87afb7e 100644 (file)
@@ -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 )