diff mbox series

[FFmpeg-devel,04/11] avcodec/qsv: Make ff_qsv_map_error() static

Message ID AM7PR03MB666073AFAEB4650DA5F960138FD29@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 25394eb72ee0f0735ea06b439a8dde428def8dc3
Headers show
Series [FFmpeg-devel,01/11] avcodec/bsf: ff_list_bsf static | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 6, 2021, 12:42 p.m. UTC
It is only an auxiliary function to ff_qsv_print_(error|warning)().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/qsv.c          | 11 ++++++-----
 libavcodec/qsv_internal.h |  5 -----
 2 files changed, 6 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index c53e2e3b07..98e776477c 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -145,7 +145,10 @@  static const struct {
     { 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;
     for (i = 0; i < FF_ARRAY_ELEMS(qsv_errors); i++) {
@@ -164,8 +167,7 @@  int ff_qsv_print_error(void *log_ctx, mfxStatus err,
                        const char *error_string)
 {
     const char *desc;
-    int ret;
-    ret = ff_qsv_map_error(err, &desc);
+    int ret = qsv_map_error(err, &desc);
     av_log(log_ctx, AV_LOG_ERROR, "%s: %s (%d)\n", error_string, desc, err);
     return ret;
 }
@@ -174,8 +176,7 @@  int ff_qsv_print_warning(void *log_ctx, mfxStatus err,
                          const char *warning_string)
 {
     const char *desc;
-    int ret;
-    ret = ff_qsv_map_error(err, &desc);
+    int ret = qsv_map_error(err, &desc);
     av_log(log_ctx, AV_LOG_WARNING, "%s: %s (%d)\n", warning_string, desc, err);
     return ret;
 }
diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h
index 327a8d3385..b7ba02fdc7 100644
--- a/libavcodec/qsv_internal.h
+++ b/libavcodec/qsv_internal.h
@@ -106,11 +106,6 @@  typedef struct QSVFramesContext {
 int ff_qsv_print_iopattern(void *log_ctx, int mfx_iopattern,
                            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,
                        const char *error_string);