]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_av] fix interrupt callback is not passed down to the hls context in the first...
authorSeven Du <dujinfang@gmail.com>
Thu, 14 May 2020 04:11:41 +0000 (12:11 +0800)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:00:32 +0000 (22:00 +0300)
src/mod/applications/mod_av/avformat.c

index 6036580d649038bd3f834397fecad5300dff77fb..398bd14d7ef87f28b75a06c4b309203a6bc24548 100644 (file)
@@ -1162,6 +1162,8 @@ static switch_status_t open_input_file(av_file_context_t *context, switch_file_h
        if ((error = avformat_open_input(&context->fc, filename, NULL, NULL)) < 0) {
                char ebuf[255] = "";
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Could not open input file '%s' (error '%s')\n", filename, get_error_text(error, ebuf, sizeof(ebuf)));
+               avformat_free_context(context->fc);
+               context->fc = NULL;
                switch_goto_status(SWITCH_STATUS_FALSE, err);
        }