mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-17 22:21:17 +01:00
FFmpeg: Add support for libav 0.8.
Thanks to Michael Niedermayer for the tips.
This commit is contained in:
@@ -110,6 +110,12 @@ extern "C" {
|
|||||||
#define AV_CODEC_ID_WMAV2 CODEC_ID_WMAV2
|
#define AV_CODEC_ID_WMAV2 CODEC_ID_WMAV2
|
||||||
#define AV_CODEC_ID_WMAVOICE CODEC_ID_WMAVOICE
|
#define AV_CODEC_ID_WMAVOICE CODEC_ID_WMAVOICE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 8, 100)
|
||||||
|
inline bool av_codec_is_encoder(AVCodec *codec) {
|
||||||
|
return codec != NULL && (codec->encode != NULL || codec->encode2 != NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -538,7 +538,9 @@ static int encode_audio(AVCodecContext *avctx, AVPacket *pkt, int16_t *audio_sam
|
|||||||
|
|
||||||
frame->nb_samples = nb_samples;
|
frame->nb_samples = nb_samples;
|
||||||
frame->format = avctx->sample_fmt;
|
frame->format = avctx->sample_fmt;
|
||||||
|
#if !defined(DISABLE_DYNAMIC_LOADING_FFMPEG) || (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 13, 0))
|
||||||
frame->channel_layout = avctx->channel_layout;
|
frame->channel_layout = avctx->channel_layout;
|
||||||
|
#endif
|
||||||
|
|
||||||
buffer_size = av_samples_get_buffer_size(NULL, avctx->channels, frame->nb_samples,
|
buffer_size = av_samples_get_buffer_size(NULL, avctx->channels, frame->nb_samples,
|
||||||
avctx->sample_fmt, 0);
|
avctx->sample_fmt, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user