summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInsun Kang <insun@google.com>2012-11-23 19:00:07 +0900
committerAndreas Huber <andih@google.com>2013-02-25 09:01:01 -0800
commitc9c47e48256fc1b79a77be8226ab9030920c0355 (patch)
treec2686de16a3e0665c70d14618a4fe44cad1c4f99
parentee9cc423e2551ffbacfd226b8627737beabaec99 (diff)
downloadframeworks_av-c9c47e48256fc1b79a77be8226ab9030920c0355.zip
frameworks_av-c9c47e48256fc1b79a77be8226ab9030920c0355.tar.gz
frameworks_av-c9c47e48256fc1b79a77be8226ab9030920c0355.tar.bz2
Handles duplicated NAL start code to fix crash on HLS streams.
Some youtube live streams are encoded having duplicated NAL start code, for instance, 00 00 01 00 00 00 01 .... In previous code, zero NAL size causes crash by CHECK_GT(nalsize, 0) macro. With this patch, duplicated NAL start code will be just ignored. TESTED=Played problematic Youtube Live streams. Change-Id: I1d76f111a34bd29cb09b037eb1b0626fe5f5b140
-rw-r--r--media/libstagefright/mpeg2ts/ESQueue.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp
index 82fb637..9499712 100644
--- a/media/libstagefright/mpeg2ts/ESQueue.cpp
+++ b/media/libstagefright/mpeg2ts/ESQueue.cpp
@@ -536,7 +536,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitH264() {
size_t nalSize;
bool foundSlice = false;
while ((err = getNextNALUnit(&data, &size, &nalStart, &nalSize)) == OK) {
- CHECK_GT(nalSize, 0u);
+ if (nalSize == 0) continue;
unsigned nalType = nalStart[0] & 0x1f;
bool flush = false;