[x264-devel] Avoid using deprecated libavformat functions
Yasuhiro Ikeda
git at videolan.org
Wed Aug 10 05:15:10 CEST 2011
x264 | branch: master | Yasuhiro Ikeda <wipple625 at gmail.com> | Tue Aug 2 08:59:15 2011 +0900| [9949438453f2f11d1f4cb5d39cfc884c28c98042] | committer: Jason Garrett-Glaser
Avoid using deprecated libavformat functions
Replace av_find_stream_info with avformat_find_stream_info.
Now requires libavformat 53.3.0 or newer.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=9949438453f2f11d1f4cb5d39cfc884c28c98042
---
configure | 2 +-
input/lavf.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index dc1179e..f1a43b5 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 ee773b0..1073ee5 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 )
More information about the x264-devel
mailing list