1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Define slightly different headers for libav.

Some parameters of libav functions have no 'const' flag in contrast to their
FFmpeg counterparts. Assume that the headers come from FFmpeg if FFMPEG_VERSION
is defined. Otherwise assume that the headers come from libav.
This commit is contained in:
benjamin.drung@gmail.com 2014-06-01 16:37:17 +00:00
parent 6003abb21d
commit b55c74b210

View File

@ -583,12 +583,21 @@ extern "C" {
(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options),
(avctx, codec, options);
);
#if defined(FFMPEG_VERSION)
FFMPEG_FUNCTION_WITH_RETURN(
int,
avcodec_decode_audio4,
(AVCodecContext *avctx, AVFrame *frame, int *got_output, const AVPacket *avpkt),
(avctx, frame, got_output, avpkt)
);
#else
FFMPEG_FUNCTION_WITH_RETURN(
int,
avcodec_decode_audio4,
(AVCodecContext *avctx, AVFrame *frame, int *got_output, AVPacket *avpkt),
(avctx, frame, got_output, avpkt)
);
#endif
FFMPEG_FUNCTION_WITH_RETURN(
int,
avcodec_encode_audio2,
@ -680,12 +689,21 @@ extern "C" {
(const AVCodec *c),
(c)
);
#if defined(FFMPEG_VERSION)
FFMPEG_FUNCTION_WITH_RETURN(
AVStream*,
avformat_new_stream,
(AVFormatContext *s, const AVCodec *c),
(s, c)
);
#else
FFMPEG_FUNCTION_WITH_RETURN(
AVStream*,
avformat_new_stream,
(AVFormatContext *s, AVCodec *c),
(s, c)
);
#endif
FFMPEG_FUNCTION_WITH_RETURN(
AVFormatContext*,
avformat_alloc_context,