diff options
author | Robert Shih <robertshih@google.com> | 2014-12-19 19:05:04 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-19 19:05:04 +0000 |
commit | a07593a1c167c775279226c6c8f36d9087d2e3e6 (patch) | |
tree | e07799762b6e92c7318b9f0a1c9678b34bddbacf /media/libstagefright | |
parent | fd923e98c0f63c67fa8972dcc733951b9aa85da1 (diff) | |
parent | c9330d9ad01f0703a8f8cf5a1dbe20a9eab7ec06 (diff) | |
download | frameworks_av-a07593a1c167c775279226c6c8f36d9087d2e3e6.zip frameworks_av-a07593a1c167c775279226c6c8f36d9087d2e3e6.tar.gz frameworks_av-a07593a1c167c775279226c6c8f36d9087d2e3e6.tar.bz2 |
am c9330d9a: am 89ee55cb: Merge "OggExtractor: ignore timestamp calculation for configuration packets" into lmp-mr1-dev
* commit 'c9330d9ad01f0703a8f8cf5a1dbe20a9eab7ec06':
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 bd28583..6e32494 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()); |