diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-02-15 20:59:22 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-02-15 20:59:22 +0000 |
commit | 2f3ab5fa22ba9b5824388ee3f6cff747ea720ab2 (patch) | |
tree | 9382ad6fab2d3d91f16fd11cab94be89367aeb75 /apps/metadata/mp4.c | |
parent | 526bee6266cc9c74c591e3d517084aa83ea39873 (diff) | |
download | rockbox-2f3ab5fa22ba9b5824388ee3f6cff747ea720ab2.tar.gz rockbox-2f3ab5fa22ba9b5824388ee3f6cff747ea720ab2.zip |
Correct the metadata's VBR flag for MP4 files. ALAC is native VBR, AAC very unlikely is CBR. The VBR flag is used by several WPS.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29313 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/metadata/mp4.c')
-rw-r--r-- | apps/metadata/mp4.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/metadata/mp4.c b/apps/metadata/mp4.c index 981d639bbf..2c5faa5a59 100644 --- a/apps/metadata/mp4.c +++ b/apps/metadata/mp4.c @@ -781,13 +781,15 @@ bool get_mp4_metadata(int fd, struct mp3entry* id3) } id3->length = ((int64_t) id3->samples * 1000) / id3->frequency; - + + id3->vbr = true; /* ALAC is native VBR, AAC very unlikely is CBR. */ + if (id3->length <= 0) { logf("mp4 length invalid!"); return false; } - + id3->bitrate = ((int64_t) id3->filesize * 8) / id3->length; DEBUGF("MP4 bitrate %d, frequency %ld Hz, length %ld ms\n", id3->bitrate, id3->frequency, id3->length); |