summaryrefslogtreecommitdiff
path: root/audio/faad2/patches/patch-at
blob: 1822fd370f07fb5c50f5a219835800d904d86274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$NetBSD: patch-at,v 1.2 2008/09/24 22:25:14 tonnerre Exp $

--- frontend/main.c.orig	2007-11-01 13:33:29.000000000 +0100
+++ frontend/main.c
@@ -914,6 +914,8 @@ int decodeMP4file(char *mp4file, char *s
                 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))
                 {
@@ -1189,11 +1191,13 @@ int main(int argc, char *argv[])
         return 1;
     }
 
+#if 0
     /* only allow raw data on stdio */
     if (writeToStdio == 1)
     {
         format = 2;
     }
+#endif
 
     /* point to the specified file name */
     strcpy(aacFileName, argv[optind]);