[FFmpeg-cvslog] avformat/alp: fix handling of TUN files

Zane van Iperen git at videolan.org
Sat Nov 7 16:30:40 EET 2020


ffmpeg | branch: release/4.3 | Zane van Iperen <zane at zanevaniperen.com> | Fri Oct 23 21:35:53 2020 +1000| [1936413edaf6bb9596cb534d47c2b8d48135d132] | committer: Zane van Iperen

avformat/alp: fix handling of TUN files

Sample rate is always 22050. Verified by trying various files in the game.

(cherry picked from commit 5df7fd1cbefb51d3a3c89fe363dbafe0a89ada60)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1936413edaf6bb9596cb534d47c2b8d48135d132
---

 libavformat/alp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/alp.c b/libavformat/alp.c
index 4c2e8f0652..e1da312b8c 100644
--- a/libavformat/alp.c
+++ b/libavformat/alp.c
@@ -83,7 +83,7 @@ static int alp_read_header(AVFormatContext *s)
 
     if (hdr.header_size == 8) {
         /* .TUN music file */
-        hdr.sample_rate         = 11025 * hdr.num_channels;
+        hdr.sample_rate         = 22050;
     } else {
         /* .PCM sound file */
         hdr.sample_rate         = avio_rl32(s->pb);



More information about the ffmpeg-cvslog mailing list