]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10433: [mod_av,mod_conference] Crash when video recording fails to setup properly...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 29 Jun 2017 22:58:49 +0000 (17:58 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 29 Jun 2017 23:11:44 +0000 (18:11 -0500)
src/mod/applications/mod_av/avformat.c

index a252cfcc6d9d093582571e31e481aa2329707da2..e93ba1a00a08e4d8a6c88f7bc9b1abfdb6426175 100644 (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);
        }