blob: 71dd8693de4e347acc65dc336dce6bd335339563 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
--- frontend/main.c.orig 2007-11-01 13:33:30.000000000 -0700
+++ frontend/main.c 2008-09-16 11:01:40.000000000 -0700
@@ -911,12 +911,14 @@
if (sampleId == 0) dur = 0;
if (useAacLength || (timescale != samplerate)) {
sample_count = frameInfo.samples;
} else {
sample_count = (unsigned int)(dur * frameInfo.channels);
+ if (sample_count > frameInfo.samples)
+ sample_count = frameInfo.samples;
if (!useAacLength && !initial && (sampleId < numSamples/2) && (sample_count != frameInfo.samples))
{
faad_fprintf(stderr, "MP4 seems to have incorrect frame duration, using values from AAC data.\n");
useAacLength = 1;
sample_count = frameInfo.samples;
|