diff options
author | wm4 <wm4@nowhere> | 2016-12-07 19:44:29 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-12-07 19:53:11 +0100 |
commit | 3eceac2eab0b42ee082a0b615ebf40a21f0fb915 (patch) | |
tree | a7f719897b49f44006d44a1efcdab3b8d203aad8 /audio/filter | |
parent | a660e15c9b96bd46209e78b3c3d4cf136a039a50 (diff) | |
download | mpv-3eceac2eab0b42ee082a0b615ebf40a21f0fb915.tar.bz2 mpv-3eceac2eab0b42ee082a0b615ebf40a21f0fb915.tar.xz |
Remove compatibility things
Possible with bumped FFmpeg/Libav.
These are just the simple cases.
Diffstat (limited to 'audio/filter')
-rw-r--r-- | audio/filter/af_lavcac3enc.c | 16 | ||||
-rw-r--r-- | audio/filter/af_lavrresample.c | 5 |
2 files changed, 0 insertions, 21 deletions
diff --git a/audio/filter/af_lavcac3enc.c b/audio/filter/af_lavcac3enc.c index 0a7c5d4440..9df5adb96f 100644 --- a/audio/filter/af_lavcac3enc.c +++ b/audio/filter/af_lavcac3enc.c @@ -280,7 +280,6 @@ static int filter_out(struct af_instance *af) AVPacket pkt = {0}; av_init_packet(&pkt); -#if HAVE_AVCODEC_NEW_CODEC_API // Send input as long as it wants. while (1) { err = read_input_frame(af, frame); @@ -310,21 +309,6 @@ static int filter_out(struct af_instance *af) MP_FATAL(af, "Encode failed.\n"); goto done; } -#else - err = read_input_frame(af, frame); - if (err < 0) - goto done; - if (err == 0) - goto done; - err = -1; - int ok; - int lavc_ret = avcodec_encode_audio2(s->lavc_actx, &pkt, frame, &ok); - s->input->samples = 0; - if (lavc_ret < 0 || !ok) { - MP_FATAL(af, "Encode failed.\n"); - goto done; - } -#endif MP_DBG(af, "avcodec_encode_audio got %d, pending %d.\n", pkt.size, s->pending->samples + s->input->samples); diff --git a/audio/filter/af_lavrresample.c b/audio/filter/af_lavrresample.c index dc5d1a0d23..828be66247 100644 --- a/audio/filter/af_lavrresample.c +++ b/audio/filter/af_lavrresample.c @@ -111,12 +111,7 @@ static double get_delay(struct af_resample *s) } static int get_out_samples(struct af_resample *s, int in_samples) { -#if LIBSWRESAMPLE_VERSION_MAJOR > 1 || LIBSWRESAMPLE_VERSION_MINOR >= 2 return swr_get_out_samples(s->avrctx, in_samples); -#else - return av_rescale_rnd(in_samples, s->out_rate, s->in_rate, AV_ROUND_UP) - + swr_get_delay(s->avrctx, s->out_rate); -#endif } #endif |