summaryrefslogtreecommitdiffstats
path: root/video/image_writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/image_writer.c')
-rw-r--r--video/image_writer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/video/image_writer.c b/video/image_writer.c
index e921cb7995..b27f8660b2 100644
--- a/video/image_writer.c
+++ b/video/image_writer.c
@@ -123,10 +123,9 @@ static int write_lavc(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp)
goto error_exit;
}
- pic = avcodec_alloc_frame();
+ pic = av_frame_alloc();
if (!pic)
goto error_exit;
- avcodec_get_frame_defaults(pic);
for (int n = 0; n < 4; n++) {
pic->data[n] = image->planes[n];
pic->linesize[n] = image->stride[n];
@@ -142,7 +141,7 @@ error_exit:
if (avctx)
avcodec_close(avctx);
av_free(avctx);
- avcodec_free_frame(&pic);
+ av_frame_free(&pic);
av_free_packet(&pkt);
return success;
}