From 139a5d5bd33c9fc7708d0a79f11ee928f7796e6b Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Thu, 20 May 2010 10:37:06 -0700 Subject: Better handling of codec initialization failure in the player and thumbnail extractor. Return a runtime error instead of asserting if the software MPEG4/H.263 decoder fails to initialize. Change-Id: I5cba02ee85a41e43c2623053de40f26e2cf2efe4 related-to-bug: 2699505 --- cmds/stagefright/stagefright.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cmds/stagefright') diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 4405da6..b838f32 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -75,7 +75,12 @@ static void playSource(OMXClient *client, const sp &source) { } } - rawSource->start(); + status_t err = rawSource->start(); + + if (err != OK) { + fprintf(stderr, "rawSource returned error %d (0x%08x)\n", err, err); + return; + } if (gPlaybackAudio) { AudioPlayer *player = new AudioPlayer(NULL); -- cgit v1.1