1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-01 00:07:33 +00:00

image_writer: check a return value

Doesn't matter, since it's the flush call, but be nice. In particular,
don't upset coverity.
This commit is contained in:
wm4 2017-02-20 14:05:14 +01:00
parent cabf6468ff
commit 8c701587c8

View File

@ -136,7 +136,9 @@ static bool write_lavc(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp
int ret = avcodec_send_frame(avctx, pic);
if (ret < 0)
goto error_exit;
avcodec_send_frame(avctx, NULL); // send EOF
ret = avcodec_send_frame(avctx, NULL); // send EOF
if (ret < 0)
goto error_exit;
ret = avcodec_receive_packet(avctx, &pkt);
if (ret < 0)
goto error_exit;