[FFmpeg-cvslog] avformat/wady: Check >0 samplerate and channels 1 || 2.
Michael Niedermayer
git at videolan.org
Sun Apr 14 19:35:43 EEST 2024
ffmpeg | branch: release/6.0 | Michael Niedermayer <michael at niedermayer.cc> | Tue Mar 19 23:24:11 2024 +0100| [0c9b5241633fddc6a4cf9d1858a3f68af393a674] | committer: Michael Niedermayer
avformat/wady: Check >0 samplerate and channels 1 || 2.
The WADY decoder only supports mono and stereo
This fixes a probetest failure
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 6f9e90ab0bede36cc960a099e8f19998345e7164)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c9b5241633fddc6a4cf9d1858a3f68af393a674
---
libavformat/wady.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/wady.c b/libavformat/wady.c
index bd9b64f514..ce9c0237d7 100644
--- a/libavformat/wady.c
+++ b/libavformat/wady.c
@@ -32,7 +32,8 @@ static int wady_probe(const AVProbeData *p)
return 0;
if (p->buf[4] != 0 || p->buf[5] == 0 ||
AV_RL16(p->buf+6) == 0 ||
- AV_RL32(p->buf+8) == 0)
+ AV_RL16(p->buf+6) > 2 ||
+ (int32_t)AV_RL32(p->buf+8) <= 0)
return 0;
return AVPROBE_SCORE_MAX / 3 * 2;
More information about the ffmpeg-cvslog
mailing list