Commit 22a6d48b authored by Luca Barbato's avatar Luca Barbato

avconv: Print the avfilter errors

Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent 342fc46c
...@@ -1292,8 +1292,12 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) ...@@ -1292,8 +1292,12 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
decoded_frame->width, decoded_frame->height, av_get_pix_fmt_name(decoded_frame->format)); decoded_frame->width, decoded_frame->height, av_get_pix_fmt_name(decoded_frame->format));
ret = poll_filters(); ret = poll_filters();
if (ret < 0 && (ret != AVERROR_EOF && ret != AVERROR(EAGAIN))) if (ret < 0 && (ret != AVERROR_EOF && ret != AVERROR(EAGAIN))) {
av_log(NULL, AV_LOG_ERROR, "Error while filtering.\n"); char errbuf[128];
av_strerror(ret, errbuf, sizeof(errbuf));
av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", errbuf);
}
ist->resample_width = decoded_frame->width; ist->resample_width = decoded_frame->width;
ist->resample_height = decoded_frame->height; ist->resample_height = decoded_frame->height;
...@@ -2514,12 +2518,16 @@ static int transcode(void) ...@@ -2514,12 +2518,16 @@ static int transcode(void)
ret = poll_filters(); ret = poll_filters();
if (ret < 0) { if (ret < 0) {
if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN)) if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN)) {
continue; continue;
} else {
char errbuf[128];
av_strerror(ret, errbuf, sizeof(errbuf));
av_log(NULL, AV_LOG_ERROR, "Error while filtering.\n"); av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", errbuf);
break; break;
} }
}
/* dump report by using the output first video and audio streams */ /* dump report by using the output first video and audio streams */
print_report(0, timer_start); print_report(0, timer_start);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment