[FFmpeg-devel] [PATCH] avformat/riffdec: remove invalid sample rate check
Viraaj Raulgaonkar
viraajraulgkar at gmail.com
Tue Jan 21 14:00:05 EET 2025
Sample rates up to 2^31 - 1 are considered valid, while greater values
are invalid. Removing the check potentially allows the sample rate
to be decoded in all cases instead of halting demux for values
greater than 2^31 - 1.
Fixes Trac ticket #11361.
---
libavformat/riffdec.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index b7a85a6ab2..94dccb324e 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -179,11 +179,6 @@ int ff_get_wav_header(void *logctx, AVIOContext *pb,
par->bit_rate = bitrate;
- if (par->sample_rate <= 0) {
- av_log(logctx, AV_LOG_ERROR,
- "Invalid sample rate: %d\n", par->sample_rate);
- return AVERROR_INVALIDDATA;
- }
if (par->codec_id == AV_CODEC_ID_AAC_LATM) {
/* Channels and sample_rate values are those prior to applying SBR
* and/or PS. */
--
2.39.5
More information about the ffmpeg-devel
mailing list