From 3eceac2eab0b42ee082a0b615ebf40a21f0fb915 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 7 Dec 2016 19:44:29 +0100 Subject: Remove compatibility things Possible with bumped FFmpeg/Libav. These are just the simple cases. --- video/out/vo_lavc.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'video/out/vo_lavc.c') diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index 1721136f8b..5c7406d4b9 100644 --- a/video/out/vo_lavc.c +++ b/video/out/vo_lavc.c @@ -241,7 +241,6 @@ static void encode_video_and_write(struct vo *vo, AVFrame *frame) struct priv *vc = vo->priv; AVPacket packet = {0}; -#if HAVE_AVCODEC_NEW_CODEC_API int status = avcodec_send_frame(vc->codec, frame); if (status < 0) { MP_ERR(vo, "error encoding at %d %d/%d\n", @@ -276,24 +275,6 @@ static void encode_video_and_write(struct vo *vo, AVFrame *frame) write_packet(vo, &packet); av_packet_unref(&packet); } -#else - av_init_packet(&packet); - int got_packet = 0; - int status = avcodec_encode_video2(vc->codec, &packet, frame, &got_packet); - if (status < 0) { - MP_ERR(vo, "error encoding at %d %d/%d\n", - frame ? (int) frame->pts : -1, - vc->codec->time_base.num, - vc->codec->time_base.den); - return; - } - if (!got_packet) { - return; - } - encode_lavc_write_stats(vo->encode_lavc_ctx, vc->codec); - write_packet(vo, &packet); - av_packet_unref(&packet); -#endif } static void draw_image_unlocked(struct vo *vo, mp_image_t *mpi) -- cgit v1.2.3