summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-12-07 19:44:29 +0100
committerwm4 <wm4@nowhere>2016-12-07 19:53:11 +0100
commit3eceac2eab0b42ee082a0b615ebf40a21f0fb915 (patch)
treea7f719897b49f44006d44a1efcdab3b8d203aad8 /audio/out
parenta660e15c9b96bd46209e78b3c3d4cf136a039a50 (diff)
downloadmpv-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/out')
-rw-r--r--audio/out/ao_lavc.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/audio/out/ao_lavc.c b/audio/out/ao_lavc.c
index 8ae1317407..4dbc55a369 100644
--- a/audio/out/ao_lavc.c
+++ b/audio/out/ao_lavc.c
@@ -258,7 +258,6 @@ static void encode_audio_and_write(struct ao *ao, AVFrame *frame)
struct priv *ac = ao->priv;
AVPacket packet = {0};
-#if HAVE_AVCODEC_NEW_CODEC_API
int status = avcodec_send_frame(ac->codec, frame);
if (status < 0) {
MP_ERR(ao, "error encoding at %d %d/%d\n",
@@ -297,28 +296,6 @@ static void encode_audio_and_write(struct ao *ao, AVFrame *frame)
write_packet(ao, &packet);
av_packet_unref(&packet);
}
-#else
- av_init_packet(&packet);
- int got_packet = 0;
- int status = avcodec_encode_audio2(ac->codec, &packet, frame, &got_packet);
- if (status < 0) {
- MP_ERR(ao, "error encoding at %d %d/%d\n",
- frame ? (int) frame->pts : -1,
- ac->codec->time_base.num,
- ac->codec->time_base.den);
- return;
- }
- if (!got_packet) {
- return;
- }
- if (frame) {
- if (ac->savepts == AV_NOPTS_VALUE)
- ac->savepts = frame->pts;
- }
- encode_lavc_write_stats(ao->encode_lavc_ctx, ac->codec);
- write_packet(ao, &packet);
- av_packet_unref(&packet);
-#endif
}
// must get exactly ac->aframesize amount of data