FS-10433: [mod_av,mod_conference] Crash when video recording fails to setup properly -- fix regression

This commit is contained in:
Anthony Minessale 2017-06-29 17:58:49 -05:00
parent b8876da6d4
commit 2756c96f9d

View File

@ -2245,10 +2245,10 @@ static switch_status_t av_file_close(switch_file_handle_t *handle)
}
if (context->fc) {
if (context->has_video) {
if (context->has_video && switch_test_flag(handle, SWITCH_FILE_FLAG_WRITE)) {
av_write_trailer(context->fc);
}
mod_avformat_destroy_output_context(context);
}