From e1a8392cae584ddce6a92d88bda47e7f366769cf Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 8 Feb 2011 18:37:05 +0200 Subject: fix compilation with old FFmpeg versions af_lavcac3enc: use old SampleFormat names without AV_ prefix, the latter were only added in 2010-11 vd_ffmpeg: add ifdef around CODEC_ID_LAGARITH use demux_real: use ffmpeg_files/intreadwrite.h stream/http.c, stream/realrtsp/real.c: define AV_BASE64_SIZE macro for old libavutil versions lacking it --- libaf/af_lavcac3enc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libaf/af_lavcac3enc.c') diff --git a/libaf/af_lavcac3enc.c b/libaf/af_lavcac3enc.c index e2de58b26b..819f3f7382 100644 --- a/libaf/af_lavcac3enc.c +++ b/libaf/af_lavcac3enc.c @@ -298,17 +298,18 @@ static int af_open(af_instance_t* af){ mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't allocate context!\n"); return AF_ERROR; } - const enum AVSampleFormat *fmts = s->lavc_acodec->sample_fmts; + // using deprecated SampleFormat/FMT, AV* versions only added in 2010-11 + const enum SampleFormat *fmts = s->lavc_acodec->sample_fmts; for (int i = 0; ; i++) { - if (fmts[i] == AV_SAMPLE_FMT_NONE) { + if (fmts[i] == SAMPLE_FMT_NONE) { mp_msg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, encoder doesn't " "support expected sample formats!\n"); return AF_ERROR; - } else if (fmts[i] == AV_SAMPLE_FMT_S16) { + } else if (fmts[i] == SAMPLE_FMT_S16) { s->in_sampleformat = AF_FORMAT_S16_NE; s->lavc_actx->sample_fmt = fmts[i]; break; - } else if (fmts[i] == AV_SAMPLE_FMT_FLT) { + } else if (fmts[i] == SAMPLE_FMT_FLT) { s->in_sampleformat = AF_FORMAT_FLOAT_NE; s->lavc_actx->sample_fmt = fmts[i]; break; -- cgit v1.2.3