* [FFmpeg-devel] [PATCH] avcodec/vlc: multi vlc fix
@ 2023-09-17 8:39 Paul B Mahol
2023-09-17 14:39 ` Michael Niedermayer
0 siblings, 1 reply; 2+ messages in thread
From: Paul B Mahol @ 2023-09-17 8:39 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 10 bytes --]
Attached.
[-- Attachment #2: 0001-avcodec-vlc-add-correct-upper-limit-for-recursive-fu.patch --]
[-- Type: text/x-patch, Size: 946 bytes --]
From 1bd41c73a9113fd99c4f920dd9493fab258c6a84 Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Sun, 17 Sep 2023 10:29:34 +0200
Subject: [PATCH] avcodec/vlc: add correct upper limit for recursive function
Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
libavcodec/vlc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/vlc.c b/libavcodec/vlc.c
index b353d2e86c..3b66c94354 100644
--- a/libavcodec/vlc.c
+++ b/libavcodec/vlc.c
@@ -419,7 +419,7 @@ static int vlc_multi_gen(VLC_MULTI_ELEM *table, const VLC *single,
}
add_level(table, nb_elems, nb_codes, numbits, buf,
- 0, 0, numbits, 0, minbits, max, count, &info);
+ 0, 0, FFMIN(maxbits, numbits), 0, minbits, max, count, &info);
av_log(NULL, AV_LOG_DEBUG, "Joint: %d/%d/%d/%d/%d codes min=%ubits max=%u\n",
count[0], count[1], count[2], count[3], count[4], minbits, max);
--
2.42.0
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/vlc: multi vlc fix
2023-09-17 8:39 [FFmpeg-devel] [PATCH] avcodec/vlc: multi vlc fix Paul B Mahol
@ 2023-09-17 14:39 ` Michael Niedermayer
0 siblings, 0 replies; 2+ messages in thread
From: Michael Niedermayer @ 2023-09-17 14:39 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 1010 bytes --]
On Sun, Sep 17, 2023 at 10:39:21AM +0200, Paul B Mahol wrote:
> Attached.
> vlc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> d870bba425f718274648fad97b10f71d1698b543 0001-avcodec-vlc-add-correct-upper-limit-for-recursive-fu.patch
> From 1bd41c73a9113fd99c4f920dd9493fab258c6a84 Mon Sep 17 00:00:00 2001
> From: Paul B Mahol <onemda@gmail.com>
> Date: Sun, 17 Sep 2023 10:29:34 +0200
> Subject: [PATCH] avcodec/vlc: add correct upper limit for recursive function
>
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
> libavcodec/vlc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks!
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-17 14:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-17 8:39 [FFmpeg-devel] [PATCH] avcodec/vlc: multi vlc fix Paul B Mahol
2023-09-17 14:39 ` Michael Niedermayer
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