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:
parent
6003abb21d
commit
b55c74b210
18
src/FFmpeg.h
18
src/FFmpeg.h
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user