summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-08-05 12:09:04 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-05 12:09:04 -0700
commitb6b546e72818988865d508e380d4445da71c4503 (patch)
tree9fe675d889318715b7958d53191fdbdf4098ee46 /media/libstagefright/rtsp
parent72cb2ee37595928ba8be034e555709de6a4105fb (diff)
parent01a8595a3512c81064a372bb519e1d448cbdac42 (diff)
downloadframeworks_av-b6b546e72818988865d508e380d4445da71c4503.zip
frameworks_av-b6b546e72818988865d508e380d4445da71c4503.tar.gz
frameworks_av-b6b546e72818988865d508e380d4445da71c4503.tar.bz2
am c6d1519e: am fb861523: Merge "Specification of codec specific data as part of the session description is now optional." into gingerbread
Merge commit 'c6d1519e549740abd56df7a98b5348bd9095ae46' * commit 'c6d1519e549740abd56df7a98b5348bd9095ae46': Specification of codec specific data as part of the session description is now optional.
Diffstat (limited to 'media/libstagefright/rtsp')
-rw-r--r--media/libstagefright/rtsp/APacketSource.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/media/libstagefright/rtsp/APacketSource.cpp b/media/libstagefright/rtsp/APacketSource.cpp
index 88336ba..a577704 100644
--- a/media/libstagefright/rtsp/APacketSource.cpp
+++ b/media/libstagefright/rtsp/APacketSource.cpp
@@ -92,7 +92,9 @@ static sp<ABuffer> decodeHex(const AString &s) {
static sp<ABuffer> MakeAVCCodecSpecificData(const char *params) {
AString val;
- CHECK(GetAttribute(params, "profile-level-id", &val));
+ if (!GetAttribute(params, "profile-level-id", &val)) {
+ return NULL;
+ }
sp<ABuffer> profileLevelID = decodeHex(val);
CHECK(profileLevelID != NULL);
@@ -105,7 +107,10 @@ static sp<ABuffer> MakeAVCCodecSpecificData(const char *params) {
size_t numPicParameterSets = 0;
size_t totalPicParameterSetSize = 0;
- CHECK(GetAttribute(params, "sprop-parameter-sets", &val));
+ if (!GetAttribute(params, "sprop-parameter-sets", &val)) {
+ return NULL;
+ }
+
size_t start = 0;
for (;;) {
ssize_t commaPos = val.find(",", start);
@@ -256,9 +261,11 @@ APacketSource::APacketSource(
sp<ABuffer> codecSpecificData =
MakeAVCCodecSpecificData(params.c_str());
- mFormat->setData(
- kKeyAVCC, 0,
- codecSpecificData->data(), codecSpecificData->size());
+ if (codecSpecificData != NULL) {
+ mFormat->setData(
+ kKeyAVCC, 0,
+ codecSpecificData->data(), codecSpecificData->size());
+ }
} else if (!strncmp(desc.c_str(), "H263-2000/", 10)
|| !strncmp(desc.c_str(), "H263-1998/", 10)) {
mFormat->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_H263);