Преглед изворни кода

support even older versions of ffmpeg

rdb пре 13 година
родитељ
комит
557257f4b8
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      panda/src/movies/ffmpegVirtualFile.cxx

+ 5 - 1
panda/src/movies/ffmpegVirtualFile.cxx

@@ -119,8 +119,12 @@ open_vfs(const Filename &filename) {
   string url = strm.str();
   string url = strm.str();
 
 
   // Now we can open the stream.
   // 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);
     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) {
   if (result < 0) {
     _format_context = NULL;
     _format_context = NULL;
     close();
     close();