]> git.tue.mpg.de Git - paraslash.git/commitdiff
ogg_afh.c: Store the bitrate in KHz rather than in Hz.
authorAndre Noll <maan@systemlinux.org>
Sat, 15 Sep 2007 07:29:18 +0000 (09:29 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 15 Sep 2007 07:29:18 +0000 (09:29 +0200)
The other audio format handlers also do it that way.

ogg_afh.c

index 2b4c100a9f32c7f1091b568680aee97598a6d7e0..71ee7e309c48f86fd3a1c1cb1f09840a1ff66d1b 100644 (file)
--- a/ogg_afh.c
+++ b/ogg_afh.c
@@ -263,7 +263,7 @@ static int ogg_get_file_info(char *map, size_t numbytes,
                goto err;
        afi->seconds_total = ov_time_total(&of, -1);
        afi->frequency = vi->rate;
-       afi->bitrate = ov_bitrate(&of, 0);
+       afi->bitrate = ov_bitrate(&of, 0) / 1000;
        afi->channels = vi->channels;
        afi->chunks_total = ogg_compute_chunk_table(&of, afi, afi->seconds_total);
        sprintf(afi->info_string, "audio_file_info1:%lu x %lu, %ukHz, "
@@ -271,7 +271,7 @@ static int ogg_get_file_info(char *map, size_t numbytes,
                "audio_file_info2: \n"
                "audio_file_info3: \n",
                afi->chunks_total, (long unsigned) (chunk_time * 1000 * 1000),
-               afi->frequency / 1000, vi->channels, afi->bitrate / 1000
+               afi->frequency / 1000, vi->channels, afi->bitrate
                );
        afi->chunk_tv.tv_sec = 0;
        afi->chunk_tv.tv_usec = 250 * 1000;