Commit b3d2035e authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: use av_err2str()

Found-by: 's avatarTimothy Gu <timothygu99@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 5e1d8637
...@@ -1743,7 +1743,9 @@ static void flush_encoders(void) ...@@ -1743,7 +1743,9 @@ static void flush_encoders(void)
ret = encode(enc, &pkt, NULL, &got_packet); ret = encode(enc, &pkt, NULL, &got_packet);
update_benchmark("flush %s %d.%d", desc, ost->file_index, ost->index); update_benchmark("flush %s %d.%d", desc, ost->file_index, ost->index);
if (ret < 0) { 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); exit_program(1);
} }
if (ost->logfile && enc->stats_out) { if (ost->logfile && enc->stats_out) {
...@@ -1870,7 +1872,8 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p ...@@ -1870,7 +1872,8 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
pkt->data, pkt->size, pkt->data, pkt->size,
pkt->flags & AV_PKT_FLAG_KEY); pkt->flags & AV_PKT_FLAG_KEY);
if (ret < 0) { 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); exit_program(1);
} }
if (ret) { if (ret) {
...@@ -1890,7 +1893,8 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p ...@@ -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 */ /* 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); int ret = avpicture_fill(&pict, opkt.data, ost->st->codec->pix_fmt, ost->st->codec->width, ost->st->codec->height);
if (ret < 0) { 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); exit_program(1);
} }
opkt.data = (uint8_t *)&pict; opkt.data = (uint8_t *)&pict;
......
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