From 16dde98b2c90d166b4c3edd48c55545bcfcf13b6 Mon Sep 17 00:00:00 2001 From: Sergey Dobrodey Date: Thu, 18 Jul 2019 18:13:13 +0300 Subject: [PATCH] videostreamer.c: dont call avformat_free_context avformat_close_input frees context and all its contents and set it to NULL https://www.ffmpeg.org/doxygen/3.3/group__lavf__decoding.html#gae804b99aec044690162b8b9b110236a4 --- videostreamer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/videostreamer.c b/videostreamer.c index 8432924..efb4da7 100644 --- a/videostreamer.c +++ b/videostreamer.c @@ -114,8 +114,7 @@ vs_destroy_input(struct VSInput * const input) } if (input->format_ctx) { - avformat_close_input(&input->format_ctx); - avformat_free_context(input->format_ctx); + avformat_close_input(&input->format_ctx); } free(input);