From 64718dbe0e1ab4a1acec09f28db83f2838fdfe1f Mon Sep 17 00:00:00 2001 From: Arulselvan M Date: Mon, 3 Dec 2012 15:58:44 +0530 Subject: Can't play AAC file with ID3 tag. When the file is scanned, the ID3 tag is found to have a footer at the end of audio data. And getAdtsFrameLength return zero after reading the footer. As a result, the duration and mInitCheck are not set. The current change considers the data till footer and sets the duration based on no. of frames read till the footer/corrupt frame. Change-Id: Ie8f898435f0d4ca31fdd355146c4db7b37c0b988 Signed-off-by: Arulselvan M Signed-off-by: Jin Wei --- media/libstagefright/AACExtractor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media/libstagefright/AACExtractor.cpp') diff --git a/media/libstagefright/AACExtractor.cpp b/media/libstagefright/AACExtractor.cpp index 45e8a30..f6434b4 100644 --- a/media/libstagefright/AACExtractor.cpp +++ b/media/libstagefright/AACExtractor.cpp @@ -174,7 +174,7 @@ AACExtractor::AACExtractor( if (mDataSource->getSize(&streamSize) == OK) { while (offset < streamSize) { if ((frameSize = getAdtsFrameLength(source, offset, NULL)) == 0) { - return; + break; } mOffsetVector.push(offset); -- cgit v1.1