File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
media/libstagefright/mpeg2ts Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -724,8 +724,10 @@ void ATSParser::Stream::onPayloadData(
724724 const uint8_t *data, size_t size) {
725725 LOGV (" onPayloadData mStreamType=0x%02x" , mStreamType );
726726
727- CHECK (PTS_DTS_flags == 2 || PTS_DTS_flags == 3 );
728- int64_t timeUs = mProgram ->convertPTSToTimestamp (PTS);
727+ int64_t timeUs = 0ll ; // no presentation timestamp available.
728+ if (PTS_DTS_flags == 2 || PTS_DTS_flags == 3 ) {
729+ timeUs = mProgram ->convertPTSToTimestamp (PTS);
730+ }
729731
730732 status_t err = mQueue ->appendData (data, size, timeUs);
731733
Original file line number Diff line number Diff line change @@ -444,6 +444,10 @@ int64_t ElementaryStreamQueue::fetchTimestamp(size_t size) {
444444 }
445445 }
446446
447+ if (timeUs == 0ll ) {
448+ LOGV (" Returning 0 timestamp" );
449+ }
450+
447451 return timeUs;
448452}
449453
You can’t perform that action at this time.
0 commit comments