From 15ebd70bdb7aeb3d5ce309710dbd64c0ea038113 Mon Sep 17 00:00:00 2001 From: Wei Jia Date: Wed, 3 Dec 2014 14:10:16 -0800 Subject: avc_util: try to find the first start code prefix 0x000001 even though there is non-zero byte at the beginning of the buffer. ESQueue: allow one PES playload contains multiple ADTS AAC frames. Bug: 18532335 Change-Id: I1f42017cff139d5e932e0aaa3e7d33164d1a48e7 --- media/libstagefright/mpeg2ts/ESQueue.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'media/libstagefright/mpeg2ts') diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp index db5d23e..042f4e6 100644 --- a/media/libstagefright/mpeg2ts/ESQueue.cpp +++ b/media/libstagefright/mpeg2ts/ESQueue.cpp @@ -346,12 +346,13 @@ status_t ElementaryStreamQueue::appendData( } if (frameLength != size - startOffset) { - ALOGW("got ADTS AAC frame length %zd instead of %zd", + ALOGW("First ADTS AAC frame length is %zd bytes, " + "while the buffer size is %zd bytes.", frameLength, size - startOffset); } data = &ptr[startOffset]; - size = frameLength; + size -= startOffset; #endif break; } -- cgit v1.1