You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/hw_base_encode: log the readable error message on failure
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. Signed-off-by: Marth64 <marth64@proxyid.net>
This commit is contained in:
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "libavutil/avassert.h"
|
#include "libavutil/avassert.h"
|
||||||
#include "libavutil/common.h"
|
#include "libavutil/common.h"
|
||||||
|
#include "libavutil/error.h"
|
||||||
#include "libavutil/internal.h"
|
#include "libavutil/internal.h"
|
||||||
#include "libavutil/log.h"
|
#include "libavutil/log.h"
|
||||||
#include "libavutil/mem.h"
|
#include "libavutil/mem.h"
|
||||||
@ -603,7 +604,7 @@ start:
|
|||||||
av_fifo_can_read(ctx->encode_fifo);
|
av_fifo_can_read(ctx->encode_fifo);
|
||||||
err = ctx->op->issue(avctx, pic);
|
err = ctx->op->issue(avctx, pic);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Encode failed: %d.\n", err);
|
av_log(avctx, AV_LOG_ERROR, "Encode failed: %s.\n", av_err2str(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
pic->encode_issued = 1;
|
pic->encode_issued = 1;
|
||||||
@ -630,7 +631,7 @@ start:
|
|||||||
|
|
||||||
err = ctx->op->issue(avctx, pic);
|
err = ctx->op->issue(avctx, pic);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Encode failed: %d.\n", err);
|
av_log(avctx, AV_LOG_ERROR, "Encode failed: %s.\n", av_err2str(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user