diff options
-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) | |||
781 | } | 781 | } |
782 | 782 | ||
783 | id3->length = ((int64_t) id3->samples * 1000) / id3->frequency; | 783 | id3->length = ((int64_t) id3->samples * 1000) / id3->frequency; |
784 | 784 | ||
785 | id3->vbr = true; /* ALAC is native VBR, AAC very unlikely is CBR. */ | ||
786 | |||
785 | if (id3->length <= 0) | 787 | if (id3->length <= 0) |
786 | { | 788 | { |
787 | logf("mp4 length invalid!"); | 789 | logf("mp4 length invalid!"); |
788 | return false; | 790 | return false; |
789 | } | 791 | } |
790 | 792 | ||
791 | id3->bitrate = ((int64_t) id3->filesize * 8) / id3->length; | 793 | id3->bitrate = ((int64_t) id3->filesize * 8) / id3->length; |
792 | DEBUGF("MP4 bitrate %d, frequency %ld Hz, length %ld ms\n", | 794 | DEBUGF("MP4 bitrate %d, frequency %ld Hz, length %ld ms\n", |
793 | id3->bitrate, id3->frequency, id3->length); | 795 | id3->bitrate, id3->frequency, id3->length); |