summaryrefslogtreecommitdiff
path: root/lib/rbcodec
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec')
-rw-r--r--lib/rbcodec/metadata/metadata.h2
-rw-r--r--lib/rbcodec/metadata/mp4.c8
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/rbcodec/metadata/metadata.h b/lib/rbcodec/metadata/metadata.h
index 1a205a08eb..cab387e36c 100644
--- a/lib/rbcodec/metadata/metadata.h
+++ b/lib/rbcodec/metadata/metadata.h
@@ -259,7 +259,7 @@ struct mp3entry {
259 int tail_trim; /* Number of samples to remove from the end */ 259 int tail_trim; /* Number of samples to remove from the end */
260 260
261 /* Added for Vorbis, used by mp4 parser as well. */ 261 /* Added for Vorbis, used by mp4 parser as well. */
262 unsigned long samples; /* number of samples in track */ 262 uint64_t samples; /* number of samples in track */
263 263
264 /* MP3 stream specific info */ 264 /* MP3 stream specific info */
265 unsigned long frame_count; /* number of frames in the file (if VBR) */ 265 unsigned long frame_count; /* number of frames in the file (if VBR) */
diff --git a/lib/rbcodec/metadata/mp4.c b/lib/rbcodec/metadata/mp4.c
index 19e6b515c7..7686165a0d 100644
--- a/lib/rbcodec/metadata/mp4.c
+++ b/lib/rbcodec/metadata/mp4.c
@@ -707,13 +707,11 @@ static bool read_mp4_container(int fd, struct mp3entry* id3,
707 * need any further special handling. */ 707 * need any further special handling. */
708 if (id3->codectype==AFMT_MP4_AAC_HE && l<=1024) 708 if (id3->codectype==AFMT_MP4_AAC_HE && l<=1024)
709 { 709 {
710 id3->samples += n * l * 2; 710 l *= 2;
711 id3->needs_upsampling_correction = true; 711 id3->needs_upsampling_correction = true;
712 } 712 }
713 else 713
714 { 714 id3->samples += (uint64_t) n * l;
715 id3->samples += n * l;
716 }
717 } 715 }
718 716
719 size = 0; 717 size = 0;