This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 87a6be19f8ea8e9e311865048f918a9e3313a4a0
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Thu Apr 16 16:29:44 2026 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Mon Apr 20 12:54:31 2026 +0200

    avcodec/pdvenc: Remove always false check
    
    av_image_check_size() already checks that width*height
    fits into an int.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/pdvenc.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/libavcodec/pdvenc.c b/libavcodec/pdvenc.c
index 80f8599f51..8334824067 100644
--- a/libavcodec/pdvenc.c
+++ b/libavcodec/pdvenc.c
@@ -44,7 +44,6 @@ typedef struct PDVEncContext {
 static av_cold int encode_init(AVCodecContext *avctx)
 {
     PDVEncContext *s = avctx->priv_data;
-    size_t frame_size;
     int ret;
 
     ret = av_image_check_size(avctx->width, avctx->height, 0, avctx);
@@ -53,14 +52,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
 
     s->row_size   = (avctx->width + 7) >> 3;
 
-    ret = av_size_mult(s->row_size, avctx->height, &frame_size);
-    if (ret < 0 || frame_size > INT_MAX) {
-        av_log(avctx, AV_LOG_ERROR,
-               "Cannot allocate frame buffer for dimensions %dx%d.\n",
-               avctx->width, avctx->height);
-        return AVERROR(EINVAL);
-    }
-    s->frame_size = frame_size;
+    s->frame_size = s->row_size * avctx->height;
 
     s->previous_frame = av_malloc(s->frame_size);
     s->work_frame     = av_malloc(s->frame_size);

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to