]> 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 22:58:49 +0000 (17:58 -0500)
src/mod/applications/mod_av/avformat.c

index 1f2c273690da0f269af42b7a56d2a35665b48304..e598e756f41c9321429c3c04cd58415ae56d8f14 100644 (file)
@@ -2244,10 +2244,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);
        }