summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/httplive
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2013-12-17 14:10:46 -0800
committerLajos Molnar <lajos@google.com>2013-12-17 14:27:17 -0800
commitfd9b01b92a95f94d2d3a8b0ee5973756784fe05f (patch)
tree5f50d11e73f6264bab28bfea76afc3973bf13e8d /media/libstagefright/httplive
parent98147613fd3b1dc2938e3f658641c9f2139eb9ec (diff)
downloadframeworks_av-fd9b01b92a95f94d2d3a8b0ee5973756784fe05f.zip
frameworks_av-fd9b01b92a95f94d2d3a8b0ee5973756784fe05f.tar.gz
frameworks_av-fd9b01b92a95f94d2d3a8b0ee5973756784fe05f.tar.bz2
stagefright: Fix issue with tracking media format in packet source
Media format in AnotherPacketSource is now tracked across discontinuities. This fixes a bug where format was set on queueAccessUnit and cleared on dequeueAccessUnit, thereby allowing it to remain cleared. Change-Id: I20975a630443f4a223a2b4344e8244f34b9560b9 Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 12060952
Diffstat (limited to 'media/libstagefright/httplive')
-rw-r--r--media/libstagefright/httplive/PlaylistFetcher.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp
index 1754bf2..f095987 100644
--- a/media/libstagefright/httplive/PlaylistFetcher.cpp
+++ b/media/libstagefright/httplive/PlaylistFetcher.cpp
@@ -861,12 +861,13 @@ status_t PlaylistFetcher::extractAndQueueAccessUnits(
&& source->dequeueAccessUnit(&accessUnit) == OK) {
// Note that we do NOT dequeue any discontinuities.
+ // for simplicity, store a reference to the format in each unit
+ sp<MetaData> format = source->getFormat();
+ if (format != NULL) {
+ accessUnit->meta()->setObject("format", format);
+ }
packetSource->queueAccessUnit(accessUnit);
}
-
- if (packetSource->getFormat() == NULL) {
- packetSource->setFormat(source->getFormat());
- }
}
return OK;