summaryrefslogtreecommitdiffstats
path: root/libaf
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-02-08 18:37:05 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-02-08 19:07:10 +0200
commite1a8392cae584ddce6a92d88bda47e7f366769cf (patch)
tree5977700a89f12da7fc3773320918b6246604a93b /libaf
parentcba6d60bcd2e51dfd9a42007c0421e7635e78a9c (diff)
downloadmpv-e1a8392cae584ddce6a92d88bda47e7f366769cf.tar.bz2
mpv-e1a8392cae584ddce6a92d88bda47e7f366769cf.tar.xz
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
Diffstat (limited to 'libaf')
-rw-r--r--libaf/af_lavcac3enc.c9
1 files changed, 5 insertions, 4 deletions
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;