diff options
author | Andreas Huber <andih@google.com> | 2012-02-21 14:38:23 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-02-22 16:20:59 -0800 |
commit | 5c850396b39a57baabd37a9c0c8324f1bee408ca (patch) | |
tree | f96a99dcb625214edb4262fc26e7f4cb6a18dcfa /cmds | |
parent | 592b213608b67b6c9a72ed080db56fa9fb2cdcf8 (diff) | |
download | frameworks_base-5c850396b39a57baabd37a9c0c8324f1bee408ca.zip frameworks_base-5c850396b39a57baabd37a9c0c8324f1bee408ca.tar.gz frameworks_base-5c850396b39a57baabd37a9c0c8324f1bee408ca.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 'cmds')
-rw-r--r-- | cmds/stagefright/SimplePlayer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmds/stagefright/SimplePlayer.cpp b/cmds/stagefright/SimplePlayer.cpp index d5b9223..f850344 100644 --- a/cmds/stagefright/SimplePlayer.cpp +++ b/cmds/stagefright/SimplePlayer.cpp @@ -324,9 +324,8 @@ status_t SimplePlayer::onPrepare() { CHECK_EQ(err, (status_t)OK); size_t j = 0; - sp<RefBase> obj; - while (format->findObject(StringPrintf("csd-%d", j).c_str(), &obj)) { - sp<ABuffer> buffer = static_cast<ABuffer *>(obj.get()); + sp<ABuffer> buffer; + while (format->findBuffer(StringPrintf("csd-%d", j).c_str(), &buffer)) { state->mCSD.push_back(buffer); ++j; |