|
From: rainbyte <rai...@us...> - 2012-07-17 10:49:30
|
Author: Lasse Kärkkäinen <tronic+ndrm at trn.iki.fi> Date: Wed Mar 21 06:22:48 2012 +0200 Restore support for older libav versions (Ubuntu 11.10). --- game/ffmpeg.cc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/game/ffmpeg.cc b/game/ffmpeg.cc index 32a6b78..c04ba8d 100644 --- a/game/ffmpeg.cc +++ b/game/ffmpeg.cc @@ -33,7 +33,11 @@ FFmpeg::~FFmpeg() { if (pResampleCtx) audio_resample_close(pResampleCtx); if (pAudioCodecCtx) avcodec_close(pAudioCodecCtx); if (pVideoCodecCtx) avcodec_close(pVideoCodecCtx); +#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0) if (pFormatCtx) avformat_close_input(&pFormatCtx); +#else + if (pFormatCtx) av_close_input_file(pFormatCtx); +#endif } double FFmpeg::duration() const { |