mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
Remove compatibility things
Possible with bumped FFmpeg/Libav. These are just the simple cases.
This commit is contained in:
@@ -133,7 +133,6 @@ static bool write_lavc(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp
|
||||
pic->color_trc = mp_csp_trc_to_avcol_trc(image->params.color.gamma);
|
||||
}
|
||||
|
||||
#if HAVE_AVCODEC_NEW_CODEC_API
|
||||
int ret = avcodec_send_frame(avctx, pic);
|
||||
if (ret < 0)
|
||||
goto error_exit;
|
||||
@@ -142,11 +141,6 @@ static bool write_lavc(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp
|
||||
if (ret < 0)
|
||||
goto error_exit;
|
||||
got_output = 1;
|
||||
#else
|
||||
int ret = avcodec_encode_video2(avctx, &pkt, pic, &got_output);
|
||||
if (ret < 0)
|
||||
goto error_exit;
|
||||
#endif
|
||||
|
||||
fwrite(pkt.data, pkt.size, 1, fp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user