diff options
author | Andreas Huber <andih@google.com> | 2010-11-15 09:03:03 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-11-15 09:03:03 -0800 |
commit | 6a1f5f90e40bbbb0635af9bf0addace723dccb77 (patch) | |
tree | ab450f7409247b0e8579f670324ef61226f13df6 /media/libstagefright/mpeg2ts | |
parent | 98d50a0be8a61fa1d093136b57bc5712be795c2b (diff) | |
download | frameworks_base-6a1f5f90e40bbbb0635af9bf0addace723dccb77.zip frameworks_base-6a1f5f90e40bbbb0635af9bf0addace723dccb77.tar.gz frameworks_base-6a1f5f90e40bbbb0635af9bf0addace723dccb77.tar.bz2 |
More HTTP live support, AES encryption etc.
Change-Id: Ia5088042dd0a2181cb73cf8c7a2ff81e34b3064c
related-to-bug: 2368598
Diffstat (limited to 'media/libstagefright/mpeg2ts')
-rw-r--r-- | media/libstagefright/mpeg2ts/ATSParser.cpp | 9 | ||||
-rw-r--r-- | media/libstagefright/mpeg2ts/ESQueue.cpp | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/media/libstagefright/mpeg2ts/ATSParser.cpp b/media/libstagefright/mpeg2ts/ATSParser.cpp index c88c6c1..f06a1bb 100644 --- a/media/libstagefright/mpeg2ts/ATSParser.cpp +++ b/media/libstagefright/mpeg2ts/ATSParser.cpp @@ -274,6 +274,8 @@ ATSParser::Stream::Stream( mQueue(streamType == 0x1b ? ElementaryStreamQueue::H264 : ElementaryStreamQueue::AAC) { mBuffer->setRange(0, 0); + + LOGV("new stream PID 0x%02x, type 0x%02x", elementaryPID, streamType); } ATSParser::Stream::~Stream() { @@ -307,7 +309,8 @@ void ATSParser::Stream::parse( } void ATSParser::Stream::signalDiscontinuity(bool isASeek) { - LOGV("Stream discontinuity"); + isASeek = false; // Always signal a "real" discontinuity + mPayloadStarted = false; mBuffer->setRange(0, 0); @@ -317,7 +320,9 @@ void ATSParser::Stream::signalDiscontinuity(bool isASeek) { // This is only a "minor" discontinuity, we stay within the same // bitstream. - mSource->clear(); + if (mSource != NULL) { + mSource->clear(); + } return; } diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp index b0b9e66..f11b3c3 100644 --- a/media/libstagefright/mpeg2ts/ESQueue.cpp +++ b/media/libstagefright/mpeg2ts/ESQueue.cpp @@ -41,7 +41,10 @@ sp<MetaData> ElementaryStreamQueue::getFormat() { } void ElementaryStreamQueue::clear() { - mBuffer->setRange(0, 0); + if (mBuffer != NULL) { + mBuffer->setRange(0, 0); + } + mTimestamps.clear(); mFormat.clear(); } |