Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH] avcodec/dv: Don't pretend initializing work chunks can fail
Date: Thu,  4 Apr 2024 21:30:47 +0200
Message-ID: <GV1P250MB073758DA375A99B2668A63178F3C2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/dv.c          | 4 +---
 libavcodec/dv_internal.h | 2 +-
 libavcodec/dvdec.c       | 6 +-----
 libavcodec/dvenc.c       | 6 +-----
 4 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index eb49978ad8..194d982562 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -166,7 +166,7 @@ static inline void dv_calc_mb_coordinates(const AVDVProfile *d, int chan,
     }
 }
 
-int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d)
+void ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d)
 {
     int j, i, c, s, p;
 
@@ -185,6 +185,4 @@ int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d)
             }
         }
     }
-
-    return 0;
 }
diff --git a/libavcodec/dv_internal.h b/libavcodec/dv_internal.h
index 4b4151c88d..05e26a8138 100644
--- a/libavcodec/dv_internal.h
+++ b/libavcodec/dv_internal.h
@@ -32,7 +32,7 @@ typedef struct DVwork_chunk {
     uint16_t mb_coordinates[5];
 } DVwork_chunk;
 
-int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d);
+void ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d);
 
 static inline int dv_work_pool_size(const AVDVProfile *d)
 {
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index a06e4807e7..9e8d40187d 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -637,11 +637,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame,
     }
 
     if (sys != s->sys) {
-        ret = ff_dv_init_dynamic_tables(s->work_chunks, sys);
-        if (ret < 0) {
-            av_log(avctx, AV_LOG_ERROR, "Error initializing the work tables.\n");
-            return ret;
-        }
+        ff_dv_init_dynamic_tables(s->work_chunks, sys);
         dv_init_weight_tables(s, sys);
         s->sys = sys;
     }
diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c
index ce21247081..3afeedbb87 100644
--- a/libavcodec/dvenc.c
+++ b/libavcodec/dvenc.c
@@ -93,11 +93,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx)
         return AVERROR(EINVAL);
     }
 
-    ret = ff_dv_init_dynamic_tables(s->work_chunks, s->sys);
-    if (ret < 0) {
-        av_log(avctx, AV_LOG_ERROR, "Error initializing work tables.\n");
-        return ret;
-    }
+    ff_dv_init_dynamic_tables(s->work_chunks, s->sys);
 
     memset(&fdsp,0, sizeof(fdsp));
     memset(&mecc,0, sizeof(mecc));
-- 
2.40.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

             reply	other threads:[~2024-04-04 19:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 19:30 Andreas Rheinhardt [this message]
2024-04-05 22:17 ` Andreas Rheinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=GV1P250MB073758DA375A99B2668A63178F3C2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git