[x264-devel] [PATCH] Fix use of deprecated av_close_input_file() call.

Jason Martens cacepi at gmail.com
Sat Mar 10 22:42:37 CET 2012


Oops. Full patch.

---
 configure    |    2 +-
 input/lavf.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 16970b8..97d511b 100755
--- a/configure
+++ b/configure
@@ -825,7 +825,7 @@ if [ "$lavf" = "auto" ] ; then
         done
     fi
     LAVF_LIBS="-L. $LAVF_LIBS"
-    if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "avformat_find_stream_info(0,0); avcodec_open2(0,0,0);" ; then
+    if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "avformat_close_input(0);" ; then
         if [ "$swscale" = "yes" ]; then
             lavf="yes"
         else
diff --git a/input/lavf.c b/input/lavf.c
index b3b7fc6..8ca5fe7 100644
--- a/input/lavf.c
+++ b/input/lavf.c
@@ -245,7 +245,7 @@ static int close_file( hnd_t handle )
 {
     lavf_hnd_t *h = handle;
     avcodec_close( h->lavf->streams[h->stream_id]->codec );
-    av_close_input_file( h->lavf );
+    avformat_close_input( &h->lavf );
     free( h );
     return 0;
 }
-- 
1.7.7.5 (Apple Git-26)


More information about the x264-devel mailing list