diff options
-rw-r--r-- | include/media/stagefright/MediaCodec.h | 2 | ||||
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h index b87a09e..bca78b9 100644 --- a/include/media/stagefright/MediaCodec.h +++ b/include/media/stagefright/MediaCodec.h @@ -268,7 +268,7 @@ private: static void PostReplyWithError(int32_t replyID, int32_t err); - status_t init(const char *name, bool nameIsType, bool encoder); + status_t init(const AString &name, bool nameIsType, bool encoder); void setState(State newState); void returnBuffersToCodec(); diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index 0bfc6e4..6c98c52 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -179,7 +179,7 @@ void MediaCodec::PostReplyWithError(int32_t replyID, int32_t err) { response->postReply(replyID); } -status_t MediaCodec::init(const char *name, bool nameIsType, bool encoder) { +status_t MediaCodec::init(const AString &name, bool nameIsType, bool encoder) { // save init parameters for reset mInitName = name; mInitNameIsType = nameIsType; @@ -191,7 +191,7 @@ status_t MediaCodec::init(const char *name, bool nameIsType, bool encoder) { // queue. mCodec = new ACodec; bool needDedicatedLooper = false; - if (nameIsType && !strncasecmp(name, "video/", 6)) { + if (nameIsType && !strncasecmp(name.c_str(), "video/", 6)) { needDedicatedLooper = true; } else { AString tmp = name; @@ -357,7 +357,7 @@ status_t MediaCodec::reset() { mHaveInputSurface = false; if (err == OK) { - err = init(mInitName.c_str(), mInitNameIsType, mInitIsEncoder); + err = init(mInitName, mInitNameIsType, mInitIsEncoder); } return err; } |