FS-10020: [mod_av] Error scrolls endlessly on a recording that fails to rtmp addrs #resolve

This commit is contained in:
Anthony Minessale 2017-02-08 13:54:38 -06:00
parent 8496878346
commit 78ecf4347d
1 changed files with 9 additions and 0 deletions

View File

@ -1285,6 +1285,7 @@ struct av_file_context {
switch_time_t last_vid_push;
int64_t seek_ts;
switch_bool_t read_paused;
int errs;
};
typedef struct av_file_context av_file_context_t;
@ -1984,7 +1985,15 @@ static switch_status_t av_file_write(switch_file_handle_t *handle, void *data, s
if (context->mutex) switch_mutex_unlock(context->mutex);
if (ret < 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error while writing audio frame: %s\n", get_error_text(ret));
context->errs++;
//switch_goto_status(SWITCH_STATUS_FALSE, end);
} else {
context->errs = 0;
}
if (context->errs > 100) {
status = SWITCH_STATUS_FALSE;
break;
}
}
if (data) {