Currently, if there is a hardware encode failure, the numeric error code will be printed making it somewhat hard to get to the root cause of the issue. Print the readable message generated by av_err2str() instead.
Unified · Split
| @@ -18,6 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | |
| 19 | 19 | #include "libavutil/avassert.h" |
| 20 | 20 | #include "libavutil/common.h" |
| 21 | +#include "libavutil/error.h" | |
| 21 | 22 | #include "libavutil/internal.h" |
| 22 | 23 | #include "libavutil/log.h" |
| 23 | 24 | #include "libavutil/mem.h" |
| @@ -603,7 +604,7 @@ start: · 579 unmodified lines | ||
| 603 | 604 | av_fifo_can_read(ctx->encode_fifo); |
| 604 | 605 | err = ctx->op->issue(avctx, pic); |
| 605 | 606 | if (err < 0) { |
| 606 | − av_log(avctx, AV_LOG_ERROR, "Encode failed: %d.\n", err); | |
| 607 | + av_log(avctx, AV_LOG_ERROR, "Encode failed: %s.\n", av_err2str(err)); | |
| 607 | 608 | return err; |
| 608 | 609 | } |
| 609 | 610 | pic->encode_issued = 1; |
| @@ -630,7 +631,7 @@ start: · 20 unmodified lines | ||
| 630 | 631 | |
| 631 | 632 | err = ctx->op->issue(avctx, pic); |
| 632 | 633 | if (err < 0) { |
| 633 | − av_log(avctx, AV_LOG_ERROR, "Encode failed: %d.\n", err); | |
| 634 | + av_log(avctx, AV_LOG_ERROR, "Encode failed: %s.\n", av_err2str(err)); | |
| 634 | 635 | return err; |
| 635 | 636 | } |
| 636 | 637 | |