ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Fri Aug 21 11:38:18 2015 +0200| [b3d2035ec3b8b57533040822de1f8ea446c7d6cc] | committer: Michael Niedermayer
ffmpeg: use av_err2str() Found-by: Timothy Gu <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3d2035ec3b8b57533040822de1f8ea446c7d6cc --- ffmpeg.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index ead1c71..b84fb15 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1743,7 +1743,9 @@ static void flush_encoders(void) ret = encode(enc, &pkt, NULL, &got_packet); update_benchmark("flush %s %d.%d", desc, ost->file_index, ost->index); if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, "%s encoding failed\n", desc); + av_log(NULL, AV_LOG_FATAL, "%s encoding failed: %s\n", + desc, + av_err2str(ret)); exit_program(1); } if (ost->logfile && enc->stats_out) { @@ -1870,7 +1872,8 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY); if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, "av_parser_change failed\n"); + av_log(NULL, AV_LOG_FATAL, "av_parser_change failed: %s\n", + av_err2str(ret)); exit_program(1); } if (ret) { @@ -1890,7 +1893,8 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p /* store AVPicture in AVPacket, as expected by the output format */ int ret = avpicture_fill(&pict, opkt.data, ost->st->codec->pix_fmt, ost->st->codec->width, ost->st->codec->height); if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, "avpicture_fill failed\n"); + av_log(NULL, AV_LOG_FATAL, "avpicture_fill failed: %s\n", + av_err2str(ret)); exit_program(1); } opkt.data = (uint8_t *)&pict; _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
