]> git.sesse.net Git - ffmpeg/commitdiff
avformat/alp: fix handling of TUN files
authorZane van Iperen <zane@zanevaniperen.com>
Fri, 23 Oct 2020 11:35:53 +0000 (21:35 +1000)
committerZane van Iperen <zane@zanevaniperen.com>
Sun, 25 Oct 2020 13:44:25 +0000 (23:44 +1000)
Sample rate is always 22050. Verified by trying various files in the game.

libavformat/alp.c

index 4c2e8f0652ff2c85618c194a70940b67d1470c86..e1da312b8c06773cac141396c405e67d329ea170 100644 (file)
@@ -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);