diff options
author | Andreas Huber <andih@google.com> | 2011-10-12 13:51:05 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-12 13:51:05 -0700 |
commit | 8c7951afa28ffa08efe3c920db364788a0968f94 (patch) | |
tree | 6f21bedf203f85eaa809dbba9561b629a3386a22 | |
parent | fd8f6f2f7557c414466f7634391821e59c1ce040 (diff) | |
parent | 33d94067adec48eee6e406b7d849df2018e4c3c2 (diff) | |
download | frameworks_base-8c7951afa28ffa08efe3c920db364788a0968f94.zip frameworks_base-8c7951afa28ffa08efe3c920db364788a0968f94.tar.gz frameworks_base-8c7951afa28ffa08efe3c920db364788a0968f94.tar.bz2 |
Merge "Assume a PTS of 0 if absent, don't bail on fragmented PES packets not having PTS" into ics-mr0
-rw-r--r-- | media/libstagefright/mpeg2ts/ATSParser.cpp | 6 | ||||
-rw-r--r-- | media/libstagefright/mpeg2ts/ESQueue.cpp | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/media/libstagefright/mpeg2ts/ATSParser.cpp b/media/libstagefright/mpeg2ts/ATSParser.cpp index e13464e..72f1282 100644 --- a/media/libstagefright/mpeg2ts/ATSParser.cpp +++ b/media/libstagefright/mpeg2ts/ATSParser.cpp @@ -724,8 +724,10 @@ void ATSParser::Stream::onPayloadData( const uint8_t *data, size_t size) { LOGV("onPayloadData mStreamType=0x%02x", mStreamType); - CHECK(PTS_DTS_flags == 2 || PTS_DTS_flags == 3); - int64_t timeUs = mProgram->convertPTSToTimestamp(PTS); + int64_t timeUs = 0ll; // no presentation timestamp available. + if (PTS_DTS_flags == 2 || PTS_DTS_flags == 3) { + timeUs = mProgram->convertPTSToTimestamp(PTS); + } status_t err = mQueue->appendData(data, size, timeUs); diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp index f8a1d84..a56da36 100644 --- a/media/libstagefright/mpeg2ts/ESQueue.cpp +++ b/media/libstagefright/mpeg2ts/ESQueue.cpp @@ -444,6 +444,10 @@ int64_t ElementaryStreamQueue::fetchTimestamp(size_t size) { } } + if (timeUs == 0ll) { + LOGV("Returning 0 timestamp"); + } + return timeUs; } |