diff options
author | Apurupa Pattapu <apurupa@codeaurora.org> | 2014-12-04 16:33:55 -0800 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2015-01-28 21:52:09 -0800 |
commit | 2a66207f1136d60857759bccbaa5b7612f7070cf (patch) | |
tree | 795eac9a1008b730d55d84808c23050a1015360f /media/libstagefright/mpeg2ts | |
parent | 174609765fb9c8cbd6aeb61f489746c3570bfee2 (diff) | |
download | frameworks_av-2a66207f1136d60857759bccbaa5b7612f7070cf.zip frameworks_av-2a66207f1136d60857759bccbaa5b7612f7070cf.tar.gz frameworks_av-2a66207f1136d60857759bccbaa5b7612f7070cf.tar.bz2 |
httplive: Create a copy of last enqueued metadata
Create duplicate of metadata in queueAccessUnit so that it is
available even after all the buffers are erased from packet source.
During a bandwidth switch httplive streaming Source uses last
enqueued timestamp as the start time for the new streams, and this
switch can occur at a time when all the packets are dequeued from
the current packet source. This is one of the scenarios when the
last enqueued time was showing a invalid timestamp. Creating a
copy will retain the timestamp value until the packet source is
active.
Bug: 18821145
Change-Id: I4d4ee700705cee58773da4660f8769f56018f9e4
Diffstat (limited to 'media/libstagefright/mpeg2ts')
-rw-r--r-- | media/libstagefright/mpeg2ts/AnotherPacketSource.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp index c579d4c..0354a2d 100644 --- a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp +++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp @@ -218,12 +218,12 @@ void AnotherPacketSource::queueAccessUnit(const sp<ABuffer> &buffer) { } if (mLatestEnqueuedMeta == NULL) { - mLatestEnqueuedMeta = buffer->meta(); + mLatestEnqueuedMeta = buffer->meta()->dup(); } else { int64_t latestTimeUs = 0; CHECK(mLatestEnqueuedMeta->findInt64("timeUs", &latestTimeUs)); if (lastQueuedTimeUs > latestTimeUs) { - mLatestEnqueuedMeta = buffer->meta(); + mLatestEnqueuedMeta = buffer->meta()->dup(); } } } |