diff options
author | Robert Shih <robertshih@google.com> | 2014-12-19 18:59:51 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-19 18:59:51 +0000 |
commit | c9330d9ad01f0703a8f8cf5a1dbe20a9eab7ec06 (patch) | |
tree | 49e5d788da1d1c9096f34c22fb65e77130a880d7 /media/libstagefright | |
parent | 9dcc312a98288b5456d3322d8393cc25c795032c (diff) | |
parent | 89ee55cb01f6e230990eb344718627c8fcbec349 (diff) | |
download | frameworks_av-c9330d9ad01f0703a8f8cf5a1dbe20a9eab7ec06.zip frameworks_av-c9330d9ad01f0703a8f8cf5a1dbe20a9eab7ec06.tar.gz frameworks_av-c9330d9ad01f0703a8f8cf5a1dbe20a9eab7ec06.tar.bz2 |
am 89ee55cb: Merge "OggExtractor: ignore timestamp calculation for configuration packets" into lmp-mr1-dev
* commit '89ee55cb01f6e230990eb344718627c8fcbec349':
OggExtractor: ignore timestamp calculation for configuration packets
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/OggExtractor.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp index 6219053..b8868aa 100644 --- a/media/libstagefright/OggExtractor.cpp +++ b/media/libstagefright/OggExtractor.cpp @@ -76,7 +76,7 @@ struct MyVorbisExtractor { status_t seekToTime(int64_t timeUs); status_t seekToOffset(off64_t offset); - status_t readNextPacket(MediaBuffer **buffer); + status_t readNextPacket(MediaBuffer **buffer, bool conf); status_t init(); @@ -185,7 +185,7 @@ status_t OggSource::read( } MediaBuffer *packet; - status_t err = mExtractor->mImpl->readNextPacket(&packet); + status_t err = mExtractor->mImpl->readNextPacket(&packet, /* conf = */ false); if (err != OK) { return err; @@ -457,7 +457,7 @@ ssize_t MyVorbisExtractor::readPage(off64_t offset, Page *page) { return sizeof(header) + page->mNumSegments + totalSize; } -status_t MyVorbisExtractor::readNextPacket(MediaBuffer **out) { +status_t MyVorbisExtractor::readNextPacket(MediaBuffer **out, bool conf) { *out = NULL; MediaBuffer *buffer = NULL; @@ -523,10 +523,8 @@ status_t MyVorbisExtractor::readNextPacket(MediaBuffer **out) { mFirstPacketInPage = false; } - if (mVi.rate) { - // Rate may not have been initialized yet if we're currently - // reading the configuration packets... - // Fortunately, the timestamp doesn't matter for those. + // ignore timestamp for configuration packets + if (!conf) { int32_t curBlockSize = packetBlockSize(buffer); if (mCurrentPage.mPrevPacketSize < 0) { mCurrentPage.mPrevPacketSize = curBlockSize; @@ -605,7 +603,7 @@ status_t MyVorbisExtractor::init() { MediaBuffer *packet; status_t err; - if ((err = readNextPacket(&packet)) != OK) { + if ((err = readNextPacket(&packet, /* conf = */ true)) != OK) { return err; } ALOGV("read packet of size %zu\n", packet->range_length()); @@ -616,7 +614,7 @@ status_t MyVorbisExtractor::init() { return err; } - if ((err = readNextPacket(&packet)) != OK) { + if ((err = readNextPacket(&packet, /* conf = */ true)) != OK) { return err; } ALOGV("read packet of size %zu\n", packet->range_length()); @@ -627,7 +625,7 @@ status_t MyVorbisExtractor::init() { return err; } - if ((err = readNextPacket(&packet)) != OK) { + if ((err = readNextPacket(&packet, /* conf = */ true)) != OK) { return err; } ALOGV("read packet of size %zu\n", packet->range_length()); |