[FFmpeg-cvslog] ffmpeg: be more verbose when printing an error in transcode()
Stefano Sabatini
git at videolan.org
Mon Jun 4 00:56:55 CEST 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Fri Jun 1 18:24:02 2012 +0200| [f1add01d98e4b7054c8a003f599eb5e272774913] | committer: Stefano Sabatini
ffmpeg: be more verbose when printing an error in transcode()
Helps debuggability.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f1add01d98e4b7054c8a003f599eb5e272774913
---
ffmpeg.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 9511a6b..24b54ed 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3577,10 +3577,12 @@ static int transcode(void)
}
// fprintf(stderr,"read #%d.%d size=%d\n", ist->file_index, ist->st->index, pkt.size);
- if (output_packet(ist, &pkt) < 0 ||
+ if ((ret = output_packet(ist, &pkt)) < 0 ||
((ret = poll_filters()) < 0 && ret != AVERROR_EOF)) {
- av_log(NULL, AV_LOG_ERROR, "Error while decoding stream #%d:%d\n",
- ist->file_index, ist->st->index);
+ char buf[128];
+ av_strerror(ret, buf, sizeof(buf));
+ av_log(NULL, AV_LOG_ERROR, "Error while decoding stream #%d:%d: %s\n",
+ ist->file_index, ist->st->index, buf);
if (exit_on_error)
exit_program(1);
av_free_packet(&pkt);
More information about the ffmpeg-cvslog
mailing list