mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-16 16:20:50 +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),
|
(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options),
|
||||||
(avctx, codec, options);
|
(avctx, codec, options);
|
||||||
);
|
);
|
||||||
|
#if defined(FFMPEG_VERSION)
|
||||||
FFMPEG_FUNCTION_WITH_RETURN(
|
FFMPEG_FUNCTION_WITH_RETURN(
|
||||||
int,
|
int,
|
||||||
avcodec_decode_audio4,
|
avcodec_decode_audio4,
|
||||||
(AVCodecContext *avctx, AVFrame *frame, int *got_output, const AVPacket *avpkt),
|
(AVCodecContext *avctx, AVFrame *frame, int *got_output, const AVPacket *avpkt),
|
||||||
(avctx, frame, got_output, 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(
|
FFMPEG_FUNCTION_WITH_RETURN(
|
||||||
int,
|
int,
|
||||||
avcodec_encode_audio2,
|
avcodec_encode_audio2,
|
||||||
@ -680,12 +689,21 @@ extern "C" {
|
|||||||
(const AVCodec *c),
|
(const AVCodec *c),
|
||||||
(c)
|
(c)
|
||||||
);
|
);
|
||||||
|
#if defined(FFMPEG_VERSION)
|
||||||
FFMPEG_FUNCTION_WITH_RETURN(
|
FFMPEG_FUNCTION_WITH_RETURN(
|
||||||
AVStream*,
|
AVStream*,
|
||||||
avformat_new_stream,
|
avformat_new_stream,
|
||||||
(AVFormatContext *s, const AVCodec *c),
|
(AVFormatContext *s, const AVCodec *c),
|
||||||
(s, c)
|
(s, c)
|
||||||
);
|
);
|
||||||
|
#else
|
||||||
|
FFMPEG_FUNCTION_WITH_RETURN(
|
||||||
|
AVStream*,
|
||||||
|
avformat_new_stream,
|
||||||
|
(AVFormatContext *s, AVCodec *c),
|
||||||
|
(s, c)
|
||||||
|
);
|
||||||
|
#endif
|
||||||
FFMPEG_FUNCTION_WITH_RETURN(
|
FFMPEG_FUNCTION_WITH_RETURN(
|
||||||
AVFormatContext*,
|
AVFormatContext*,
|
||||||
avformat_alloc_context,
|
avformat_alloc_context,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user