[mod_av] reduce some errors to warnings in logs
This commit is contained in:
parent
84a20addc8
commit
3089e8e548
|
@ -1113,7 +1113,7 @@ static switch_status_t open_input_file(av_file_context_t *context, switch_file_h
|
||||||
/** Open the input file to read from it. */
|
/** Open the input file to read from it. */
|
||||||
if ((error = avformat_open_input(&context->fc, filename, NULL, NULL)) < 0) {
|
if ((error = avformat_open_input(&context->fc, filename, NULL, NULL)) < 0) {
|
||||||
char ebuf[255] = "";
|
char ebuf[255] = "";
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not open input file '%s' (error '%s')\n", filename, get_error_text(error, ebuf, sizeof(ebuf)));
|
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)));
|
||||||
switch_goto_status(SWITCH_STATUS_FALSE, err);
|
switch_goto_status(SWITCH_STATUS_FALSE, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1123,7 +1123,7 @@ static switch_status_t open_input_file(av_file_context_t *context, switch_file_h
|
||||||
/** Get information on the input file (number of streams etc.). */
|
/** Get information on the input file (number of streams etc.). */
|
||||||
if ((error = avformat_find_stream_info(context->fc, opts ? &opts : NULL)) < 0) {
|
if ((error = avformat_find_stream_info(context->fc, opts ? &opts : NULL)) < 0) {
|
||||||
char ebuf[255] = "";
|
char ebuf[255] = "";
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not open find stream info (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Could not open find stream info (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
|
||||||
if (opts) av_dict_free(&opts);
|
if (opts) av_dict_free(&opts);
|
||||||
switch_goto_status(SWITCH_STATUS_FALSE, err);
|
switch_goto_status(SWITCH_STATUS_FALSE, err);
|
||||||
}
|
}
|
||||||
|
@ -1194,7 +1194,7 @@ GCC_DIAG_ON(deprecated-declarations)
|
||||||
// printf("has audio:%d has_video:%d\n", context->has_audio, context->has_video);
|
// printf("has audio:%d has_video:%d\n", context->has_audio, context->has_video);
|
||||||
|
|
||||||
if ((!context->has_audio) && (!context->has_video)) {
|
if ((!context->has_audio) && (!context->has_video)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Neither audio nor video stream found in file %s\n", filename);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Neither audio nor video stream found in file %s\n", filename);
|
||||||
switch_goto_status(SWITCH_STATUS_FALSE, err);
|
switch_goto_status(SWITCH_STATUS_FALSE, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1378,7 +1378,7 @@ GCC_DIAG_ON(deprecated-declarations)
|
||||||
pkt.stream_index = context->video_st.st->index;
|
pkt.stream_index = context->video_st.st->index;
|
||||||
} else {
|
} else {
|
||||||
char ebuf[255] = "";
|
char ebuf[255] = "";
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not read frame (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Could not read frame (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1400,7 +1400,7 @@ GCC_DIAG_OFF(deprecated-declarations)
|
||||||
if ((error = avcodec_decode_video2(context->video_st.st->codec, vframe, &got_data, &pkt)) < 0) {
|
if ((error = avcodec_decode_video2(context->video_st.st->codec, vframe, &got_data, &pkt)) < 0) {
|
||||||
GCC_DIAG_ON(deprecated-declarations)
|
GCC_DIAG_ON(deprecated-declarations)
|
||||||
char ebuf[255] = "";
|
char ebuf[255] = "";
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not decode frame (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Could not decode frame (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
|
||||||
av_packet_unref(&pkt);
|
av_packet_unref(&pkt);
|
||||||
av_frame_free(&vframe);
|
av_frame_free(&vframe);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue