From efe1285e8856768a97e164b6286ada4f0c0a1fc5 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 2 Jan 2013 20:51:16 +0000 Subject: [PATCH] Fix the other case of avformat_open_input too --- panda/src/movies/ffmpegVirtualFile.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/panda/src/movies/ffmpegVirtualFile.cxx b/panda/src/movies/ffmpegVirtualFile.cxx index 0639443c5e..61d1068662 100644 --- a/panda/src/movies/ffmpegVirtualFile.cxx +++ b/panda/src/movies/ffmpegVirtualFile.cxx @@ -120,7 +120,7 @@ open_vfs(const Filename &filename) { // Now we can open the stream. int result = -#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0) +#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0) avformat_open_input(&_format_context, url.c_str(), NULL, NULL); #else av_open_input_file(&_format_context, url.c_str(), NULL, 0, NULL); @@ -180,8 +180,12 @@ open_subfile(const SubfileInfo &info) { string url = strm.str(); // Now we can open the stream. - int result = + int result = +#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0) avformat_open_input(&_format_context, url.c_str(), NULL, NULL); +#else + av_open_input_file(&_format_context, url.c_str(), NULL, 0, NULL); +#endif if (result < 0) { _format_context = NULL; close();