From 51656aa9b57f609e4879e99063a9a4e6a837e69a Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 24 Feb 2012 08:41:46 -0800 Subject: Small fix to MediaCodec Change-Id: I6bcbfd35fdf5a2b0260b8f07a630a5b380e139a0 --- media/libstagefright/MediaCodec.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index 4acbdbe..ad2dfab 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -673,9 +673,8 @@ void MediaCodec::onMessageReceived(const sp &msg) { int32_t nameIsType; int32_t encoder = false; - if (!msg->findInt32("nameIsType", &nameIsType)) { - nameIsType = false; - } else { + CHECK(msg->findInt32("nameIsType", &nameIsType)); + if (nameIsType) { CHECK(msg->findInt32("encoder", &encoder)); } -- cgit v1.1