浏览代码

fix ffmpeg compile issues?

rdb 12 年之前
父节点
当前提交
21def6e5cc
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      panda/src/ffmpeg/ffmpegAudioCursor.cxx
  2. 1 1
      panda/src/ffmpeg/ffmpegVirtualFile.cxx

+ 2 - 0
panda/src/ffmpeg/ffmpegAudioCursor.cxx

@@ -321,7 +321,9 @@ reload_buffer() {
           memcpy(_buffer, _frame->data[0], bufsize);
         }
       }
+#if LIBAVUTIL_VERSION_INT > AV_VERSION_INT(52, 19, 100)
       av_frame_unref(_frame);
+#endif
 #endif
 
       if (len < 0) {

+ 1 - 1
panda/src/ffmpeg/ffmpegVirtualFile.cxx

@@ -188,7 +188,7 @@ open_subfile(const SubfileInfo &info) {
 void FfmpegVirtualFile::
 close() {
   if (_format_context != NULL) {
-#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 25, 0)
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0)
     avformat_close_input(&_format_context);
 #else
     av_close_input_file(_format_context);