diff options
author | Andreas Huber <andih@google.com> | 2012-04-11 11:27:36 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-04-11 11:29:20 -0700 |
commit | f95439afa8eb2484969d4a928b0fdd6a4d3a38d7 (patch) | |
tree | 97a033b0af8ea9e66d88ee076ac6359903d0a270 | |
parent | 2d531e1b5865d61d5ca25d77d53017b1ad180efa (diff) | |
download | frameworks_av-f95439afa8eb2484969d4a928b0fdd6a4d3a38d7.zip frameworks_av-f95439afa8eb2484969d4a928b0fdd6a4d3a38d7.tar.gz frameworks_av-f95439afa8eb2484969d4a928b0fdd6a4d3a38d7.tar.bz2 |
Changes to add support for H263-1999/2000 formats for streaming
contributed by sureshc@nvidia.com (and subsequently simplified)
Change-Id: Ia1c2ac9233f5414ce3e4a70e42e68c1c5c35eb9d
-rw-r--r-- | media/libstagefright/rtsp/AH263Assembler.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/media/libstagefright/rtsp/AH263Assembler.cpp b/media/libstagefright/rtsp/AH263Assembler.cpp index ded70fa..d0313cc 100644 --- a/media/libstagefright/rtsp/AH263Assembler.cpp +++ b/media/libstagefright/rtsp/AH263Assembler.cpp @@ -102,15 +102,17 @@ ARTPAssembler::AssemblyStatus AH263Assembler::addPacket( unsigned payloadHeader = U16_AT(buffer->data()); CHECK_EQ(payloadHeader >> 11, 0u); // RR=0 unsigned P = (payloadHeader >> 10) & 1; - CHECK_EQ((payloadHeader >> 9) & 1, 0u); // V=0 - CHECK_EQ((payloadHeader >> 3) & 0x3f, 0u); // PLEN=0 - CHECK_EQ(payloadHeader & 7, 0u); // PEBIT=0 + unsigned V = (payloadHeader >> 9) & 1; + unsigned PLEN = (payloadHeader >> 3) & 0x3f; + // unsigned PEBIT = payloadHeader & 7; + + size_t skip = V + PLEN + (P ? 0 : 2); + + buffer->setRange(buffer->offset() + skip, buffer->size() - skip); if (P) { buffer->data()[0] = 0x00; buffer->data()[1] = 0x00; - } else { - buffer->setRange(buffer->offset() + 2, buffer->size() - 2); } mPackets.push_back(buffer); |