summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/mpeg2ts/AnotherPacketSource.cpp')
-rw-r--r--media/libstagefright/mpeg2ts/AnotherPacketSource.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
index c6edf0a..0ad883b 100644
--- a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
+++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
@@ -142,16 +142,23 @@ void AnotherPacketSource::queueDiscontinuity(
Mutex::Autolock autoLock(mLock);
+#if 0
+ if (type == ATSParser::DISCONTINUITY_SEEK
+ || type == ATSParser::DISCONTINUITY_FORMATCHANGE) {
+ // XXX Fix this: This will also clear any pending discontinuities,
+ // If there's a pending DISCONTINUITY_FORMATCHANGE and the new
+ // discontinuity is "just" a DISCONTINUITY_SEEK, this will effectively
+ // downgrade the type of discontinuity received by the client.
+
+ mBuffers.clear();
+ mEOSResult = OK;
+ }
+#endif
+
mBuffers.push_back(buffer);
mCondition.signal();
}
-void AnotherPacketSource::clear() {
- Mutex::Autolock autoLock(mLock);
- mBuffers.clear();
- mEOSResult = OK;
-}
-
void AnotherPacketSource::signalEOS(status_t result) {
CHECK(result != OK);