diff options
author | Andreas Huber <andih@google.com> | 2010-05-20 10:37:06 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-05-20 10:37:06 -0700 |
commit | 139a5d5bd33c9fc7708d0a79f11ee928f7796e6b (patch) | |
tree | 18ab9da463636f4eecd524cadd5ddaf5c525f21d /cmds | |
parent | 1edbcb2bb9988cc7cb54a865aaea4613bdd53a9d (diff) | |
download | frameworks_av-139a5d5bd33c9fc7708d0a79f11ee928f7796e6b.zip frameworks_av-139a5d5bd33c9fc7708d0a79f11ee928f7796e6b.tar.gz frameworks_av-139a5d5bd33c9fc7708d0a79f11ee928f7796e6b.tar.bz2 |
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
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/stagefright/stagefright.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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<MediaSource> &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); |