diff mbox series

[FFmpeg-devel,2/2] avcodec/av1dec, vaapi_av1: Remove excessive logmessages

Message ID AS8P250MB07445CB3321D6A6B1839DF968FDBA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 6e4030a07b79a7a40c005d6257a3be1ec702bba6
Headers show
Series [FFmpeg-devel,1/2] avcodec/pthread_frame: Remove ff_thread_release_buffer() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 20, 2023, 2:34 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/av1dec.c    | 10 ++--------
 libavcodec/vaapi_av1.c | 10 ++--------
 2 files changed, 4 insertions(+), 16 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 1a4339b346..6114cb78e6 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -819,19 +819,13 @@  static av_cold int av1_decode_init(AVCodecContext *avctx)
 
     for (int i = 0; i < FF_ARRAY_ELEMS(s->ref); i++) {
         s->ref[i].f = av_frame_alloc();
-        if (!s->ref[i].f) {
-            av_log(avctx, AV_LOG_ERROR,
-                   "Failed to allocate reference frame buffer %d.\n", i);
+        if (!s->ref[i].f)
             return AVERROR(ENOMEM);
-        }
     }
 
     s->cur_frame.f = av_frame_alloc();
-    if (!s->cur_frame.f) {
-        av_log(avctx, AV_LOG_ERROR,
-               "Failed to allocate current frame buffer.\n");
+    if (!s->cur_frame.f)
         return AVERROR(ENOMEM);
-    }
 
     ret = ff_cbs_init(&s->cbc, AV_CODEC_ID_AV1, avctx);
     if (ret < 0)
diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c
index 73aa19c364..1f9a6071ba 100644
--- a/libavcodec/vaapi_av1.c
+++ b/libavcodec/vaapi_av1.c
@@ -75,19 +75,13 @@  static int vaapi_av1_decode_init(AVCodecContext *avctx)
     VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;
 
     ctx->tmp_frame = av_frame_alloc();
-    if (!ctx->tmp_frame) {
-        av_log(avctx, AV_LOG_ERROR,
-               "Failed to allocate frame.\n");
+    if (!ctx->tmp_frame)
         return AVERROR(ENOMEM);
-    }
 
     for (int i = 0; i < FF_ARRAY_ELEMS(ctx->ref_tab); i++) {
         ctx->ref_tab[i].frame = av_frame_alloc();
-        if (!ctx->ref_tab[i].frame) {
-            av_log(avctx, AV_LOG_ERROR,
-                   "Failed to allocate reference table frame %d.\n", i);
+        if (!ctx->ref_tab[i].frame)
             return AVERROR(ENOMEM);
-        }
         ctx->ref_tab[i].valid = 0;
     }