shithub: aacdec

Download patch

ref: 70bde995b7c8d1b75a156cfdd6c34c179296081e
parent: 56bf3d803998f47df96f42d16d6c70dced304568
author: menno <menno>
date: Thu Sep 4 14:35:46 EDT 2003

case fix

--- a/plugins/foo_mp4/foo_mp4.cpp
+++ b/plugins/foo_mp4/foo_mp4.cpp
@@ -1,19 +1,19 @@
 /*
 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
 ** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
-**  
+**
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** the Free Software Foundation; either version 2 of the License, or
 ** (at your option) any later version.
-** 
+**
 ** This program is distributed in the hope that it will be useful,
 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ** GNU General Public License for more details.
-** 
+**
 ** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software 
+** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
 ** Any non-GPL usage of this software or parts of this software is strictly
@@ -22,7 +22,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
-** $Id: foo_mp4.cpp,v 1.53 2003/08/31 10:27:51 menno Exp $
+** $Id: foo_mp4.cpp,v 1.54 2003/09/04 18:35:46 menno Exp $
 **/
 
 #include <mp4.h>
@@ -205,7 +205,7 @@
                 } else {
                     sample_count = sample_dur;
 
-                    if (!useAacLength && !initial && m_seekto<sample_pos && (sample_dur*frameInfo.channels != frameInfo.samples))
+                    if (!useAacLength && !initial && m_seekto<sample_pos && (sampleId < numSamples/2) && (sample_dur*frameInfo.channels != frameInfo.samples))
                     {
                         console::info("MP4 seems to have incorrect frame duration, using values from AAC data");
                         useAacLength = true;