This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new ec0173ab59 avformat/amr: add P bits check to avoid mis-detects
ec0173ab59 is described below
commit ec0173ab59e9927a27a959c8c4706cd5316d0560
Author: Jack Lau <[email protected]>
AuthorDate: Fri Dec 12 14:52:58 2025 +0800
Commit: Lynne <[email protected]>
CommitDate: Fri Dec 12 20:17:00 2025 +0000
avformat/amr: add P bits check to avoid mis-detects
Fix #21056
Refer to RFC 3267 Section 4.4.2:
A ToC entry takes the following format in octet-aligned mode:
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|F| FT |Q|P|P|
+-+-+-+-+-+-+-+-+
P bits: padding bits, MUST be set to zero.
Signed-off-by: Jack Lau <[email protected]>
---
libavformat/amr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/amr.c b/libavformat/amr.c
index 0db0a8d26a..9cc61baf55 100644
--- a/libavformat/amr.c
+++ b/libavformat/amr.c
@@ -144,7 +144,7 @@ static int amrnb_probe(const AVProbeData *p)
while (i < p->buf_size) {
mode = b[i] >> 3 & 0x0F;
- if (mode < 9 && (b[i] & 0x4) == 0x4) {
+ if (mode < 9 && (b[i] & 0x4) == 0x4 && (b[i] & 0x03) == 0) {
int last = b[i];
int size = amrnb_packed_size[mode];
while (size--) {
@@ -201,7 +201,7 @@ static int amrwb_probe(const AVProbeData *p)
while (i < p->buf_size) {
mode = b[i] >> 3 & 0x0F;
- if (mode < 10 && (b[i] & 0x4) == 0x4) {
+ if (mode < 10 && (b[i] & 0x4) == 0x4 && (b[i] & 0x03) == 0) {
int last = b[i];
int size = amrwb_packed_size[mode];
while (size--) {
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]