From 3c1f90fff67a844f455943d856bd993b280e8ad7 Mon Sep 17 00:00:00 2001 From: Martin Doucha Date: Tue, 4 Nov 2014 19:16:46 +0100 Subject: [PATCH] Dear @FFmpeg, could you please create a stable public API for v3.0? Rewriting working code on a monthly basis because library functions get renamed for no apparent reason is not fun for us downstream devs. Thank you. Fixes #11 --- src/lavfmuxer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lavfmuxer.cpp b/src/lavfmuxer.cpp index 6b03a24..c1a5d28 100644 --- a/src/lavfmuxer.cpp +++ b/src/lavfmuxer.cpp @@ -39,6 +39,11 @@ extern "C" { #define av_alloc_format_context avformat_alloc_context #define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO +#if LIBAVCODEC_VERSION_INT < ((55<<16)+(45<<8)+101) + #define av_frame_alloc avcodec_alloc_frame + #define av_frame_free avcodec_free_frame +#endif + int decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt) { AVFrame *frame = av_frame_alloc(); int ret, got_frame = 0;