summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MP3Extractor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/MP3Extractor.cpp')
-rw-r--r--media/libstagefright/MP3Extractor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp
index 2215c07..69209b5 100644
--- a/media/libstagefright/MP3Extractor.cpp
+++ b/media/libstagefright/MP3Extractor.cpp
@@ -317,6 +317,13 @@ MP3Extractor::MP3Extractor(
mSeeker = VBRISeeker::CreateFromSource(mDataSource, post_id3_pos);
}
+ if (mSeeker != NULL) {
+ // While it is safe to send the XING/VBRI frame to the decoder, this will
+ // result in an extra 1152 samples being output. The real first frame to
+ // decode is after the XING/VBRI frame, so skip there.
+ mFirstFramePos += frame_size;
+ }
+
int64_t durationUs;
if (mSeeker == NULL || !mSeeker->getDuration(&durationUs)) {