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.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
index 7a1d5b0..a8fe2c1 100644
--- a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
+++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
@@ -63,8 +63,6 @@ status_t AnotherPacketSource::dequeueAccessUnit(sp<ABuffer> *buffer) {
int32_t discontinuity;
if ((*buffer)->meta()->findInt32("discontinuity", &discontinuity)
&& discontinuity) {
- buffer->clear();
-
return INFO_DISCONTINUITY;
}
@@ -125,10 +123,14 @@ void AnotherPacketSource::queueAccessUnit(const sp<ABuffer> &buffer) {
mCondition.signal();
}
-void AnotherPacketSource::queueDiscontinuity() {
+void AnotherPacketSource::queueDiscontinuity(bool formatChange) {
sp<ABuffer> buffer = new ABuffer(0);
buffer->meta()->setInt32("discontinuity", true);
+ if (formatChange) {
+ buffer->meta()->setInt32("format-change", true);
+ }
+
Mutex::Autolock autoLock(mLock);
mBuffers.push_back(buffer);