aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-06-01 18:24:02 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-06-04 00:55:08 +0200
commitf1add01d98e4b7054c8a003f599eb5e272774913 (patch)
tree87002ed2bdf1af94149a5524a306619811dbe7a8 /ffmpeg.c
parent6a9854e8f48a977125285300826b6637a8209d8b (diff)
downloadandroid_external_ffmpeg-f1add01d98e4b7054c8a003f599eb5e272774913.tar.gz
android_external_ffmpeg-f1add01d98e4b7054c8a003f599eb5e272774913.tar.bz2
android_external_ffmpeg-f1add01d98e4b7054c8a003f599eb5e272774913.zip
ffmpeg: be more verbose when printing an error in transcode()
Helps debuggability.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 9511a6b20e..24b54edfb9 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);