···259259 int tail_trim; /* Number of samples to remove from the end */
260260261261 /* Added for Vorbis, used by mp4 parser as well. */
262262- unsigned long samples; /* number of samples in track */
262262+ uint64_t samples; /* number of samples in track */
263263264264 /* MP3 stream specific info */
265265 unsigned long frame_count; /* number of frames in the file (if VBR) */
+3-5
lib/rbcodec/metadata/mp4.c
···707707 * need any further special handling. */
708708 if (id3->codectype==AFMT_MP4_AAC_HE && l<=1024)
709709 {
710710- id3->samples += n * l * 2;
710710+ l *= 2;
711711 id3->needs_upsampling_correction = true;
712712 }
713713- else
714714- {
715715- id3->samples += n * l;
716716- }
713713+714714+ id3->samples += (uint64_t) n * l;
717715 }
718716719717 size = 0;