Commit 4c07f9ee04 for ffmpeg

commit 4c07f9ee043acf8e36753642f68792cfbb0d7a8b
Author: Peter Ross <pross@xvid.org>
Date:   Sun Sep 27 09:06:03 2026 +1000

    avformat/riff: Rhetorex ADPCM decoder

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 21de951e3a..a4cde96806 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -564,6 +564,7 @@ const AVCodecTag ff_codec_wav_tags[] = {
     { AV_CODEC_ID_METASOUND,       0x0075 },
     { AV_CODEC_ID_G729,            0x0083 },
     { AV_CODEC_ID_AAC,             0x00ff },
+    { AV_CODEC_ID_ADPCM_RHETOREX,  0x0100 },
     { AV_CODEC_ID_G723_1,          0x0111 },
     { AV_CODEC_ID_ADPCM_SANYO,     0x0125 },
     { AV_CODEC_ID_SIPR,            0x0130 },
diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index ffa3fa1100..cb25889798 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -255,6 +255,9 @@ int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb,
     if (par->codec_id == AV_CODEC_ID_ADPCM_G726 && par->sample_rate)
         par->bits_per_coded_sample = par->bit_rate / par->sample_rate;

+    if (par->codec_id == AV_CODEC_ID_ADPCM_RHETOREX && par->bits_per_coded_sample == 3)
+        par->sample_rate = par->sample_rate * 3LL / 4;
+
     /* ignore WAVEFORMATEXTENSIBLE layout if different from channel count */
     if (channels != par->ch_layout.nb_channels) {
         av_channel_layout_uninit(&par->ch_layout);