mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-07 16:40:10 +02:00
avcodec/qsv: Make ff_qsv_map_error() static
It is only an auxiliary function to ff_qsv_print_(error|warning)(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
029bfc3501
commit
25394eb72e
@ -147,7 +147,10 @@ static const struct {
|
|||||||
{ MFX_WRN_INCOMPATIBLE_AUDIO_PARAM, 0, "incompatible audio parameters" },
|
{ MFX_WRN_INCOMPATIBLE_AUDIO_PARAM, 0, "incompatible audio parameters" },
|
||||||
};
|
};
|
||||||
|
|
||||||
int ff_qsv_map_error(mfxStatus mfx_err, const char **desc)
|
/**
|
||||||
|
* Convert a libmfx error code into an FFmpeg error code.
|
||||||
|
*/
|
||||||
|
static int qsv_map_error(mfxStatus mfx_err, const char **desc)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < FF_ARRAY_ELEMS(qsv_errors); i++) {
|
for (i = 0; i < FF_ARRAY_ELEMS(qsv_errors); i++) {
|
||||||
@ -166,8 +169,7 @@ int ff_qsv_print_error(void *log_ctx, mfxStatus err,
|
|||||||
const char *error_string)
|
const char *error_string)
|
||||||
{
|
{
|
||||||
const char *desc;
|
const char *desc;
|
||||||
int ret;
|
int ret = qsv_map_error(err, &desc);
|
||||||
ret = ff_qsv_map_error(err, &desc);
|
|
||||||
av_log(log_ctx, AV_LOG_ERROR, "%s: %s (%d)\n", error_string, desc, err);
|
av_log(log_ctx, AV_LOG_ERROR, "%s: %s (%d)\n", error_string, desc, err);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -176,8 +178,7 @@ int ff_qsv_print_warning(void *log_ctx, mfxStatus err,
|
|||||||
const char *warning_string)
|
const char *warning_string)
|
||||||
{
|
{
|
||||||
const char *desc;
|
const char *desc;
|
||||||
int ret;
|
int ret = qsv_map_error(err, &desc);
|
||||||
ret = ff_qsv_map_error(err, &desc);
|
|
||||||
av_log(log_ctx, AV_LOG_WARNING, "%s: %s (%d)\n", warning_string, desc, err);
|
av_log(log_ctx, AV_LOG_WARNING, "%s: %s (%d)\n", warning_string, desc, err);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -106,11 +106,6 @@ typedef struct QSVFramesContext {
|
|||||||
int ff_qsv_print_iopattern(void *log_ctx, int mfx_iopattern,
|
int ff_qsv_print_iopattern(void *log_ctx, int mfx_iopattern,
|
||||||
const char *extra_string);
|
const char *extra_string);
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert a libmfx error code into an ffmpeg error code.
|
|
||||||
*/
|
|
||||||
int ff_qsv_map_error(mfxStatus mfx_err, const char **desc);
|
|
||||||
|
|
||||||
int ff_qsv_print_error(void *log_ctx, mfxStatus err,
|
int ff_qsv_print_error(void *log_ctx, mfxStatus err,
|
||||||
const char *error_string);
|
const char *error_string);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user