瀏覽代碼

ffmpeg: remove call deprecated in ffmpeg's libavformat 58.9.100

rdb 7 年之前
父節點
當前提交
69f8f8b7b7
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      panda/src/ffmpeg/ffmpegVirtualFile.cxx

+ 3 - 0
panda/src/ffmpeg/ffmpegVirtualFile.cxx

@@ -189,7 +189,10 @@ register_protocol() {
   }
 
   // Here's a good place to call this global ffmpeg initialization function.
+  // However, ffmpeg (but not libav) deprecated this, hence this check.
+#if LIBAVFORMAT_VERSION_MICRO < 100 || LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)
   av_register_all();
+#endif
 
   // And this one.
   avformat_network_init();