diff --git a/panda/src/ffmpeg/ffmpegAudioCursor.cxx b/panda/src/ffmpeg/ffmpegAudioCursor.cxx index 022337da60..603edfa4d5 100644 --- a/panda/src/ffmpeg/ffmpegAudioCursor.cxx +++ b/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) { diff --git a/panda/src/ffmpeg/ffmpegVirtualFile.cxx b/panda/src/ffmpeg/ffmpegVirtualFile.cxx index e4be57b2ef..098a5ef471 100644 --- a/panda/src/ffmpeg/ffmpegVirtualFile.cxx +++ b/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);