summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp/ARTPSession.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-02-21 14:38:23 -0800
committerAndreas Huber <andih@google.com>2012-02-22 16:20:59 -0800
commit2d8bedd05437b6fccdbc6bf70f673ffd86744d59 (patch)
tree1a11658a7379249eb4f6bd73b356baa4a661f41e /media/libstagefright/rtsp/ARTPSession.cpp
parent79af02c6a813b5d31fba3e7b72686a02f0ae7e0f (diff)
downloadframeworks_av-2d8bedd05437b6fccdbc6bf70f673ffd86744d59.zip
frameworks_av-2d8bedd05437b6fccdbc6bf70f673ffd86744d59.tar.gz
frameworks_av-2d8bedd05437b6fccdbc6bf70f673ffd86744d59.tar.bz2
Add new APIs AMessage::(set|find)Buffer to make it safer to pass
ABuffer objects through messages. Change-Id: I9f8b4e4c4767d0d70a0105e0c0813b754379b49d
Diffstat (limited to 'media/libstagefright/rtsp/ARTPSession.cpp')
-rw-r--r--media/libstagefright/rtsp/ARTPSession.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/media/libstagefright/rtsp/ARTPSession.cpp b/media/libstagefright/rtsp/ARTPSession.cpp
index 7a05b88..ba4e33c 100644
--- a/media/libstagefright/rtsp/ARTPSession.cpp
+++ b/media/libstagefright/rtsp/ARTPSession.cpp
@@ -145,10 +145,8 @@ void ARTPSession::onMessageReceived(const sp<AMessage> &msg) {
break;
}
- sp<RefBase> obj;
- CHECK(msg->findObject("access-unit", &obj));
-
- sp<ABuffer> accessUnit = static_cast<ABuffer *>(obj.get());
+ sp<ABuffer> accessUnit;
+ CHECK(msg->findBuffer("access-unit", &accessUnit));
uint64_t ntpTime;
CHECK(accessUnit->meta()->findInt64(