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 | 1919e5af3d8eb8bcf08e50efae2e79eaf065cf6b (patch) | |
tree | 45b94c851309676baddec07b7879f97b59d024c7 /cmds/stagefright | |
parent | dc737ca986ed9055b4bb39c67d470b6886522ca6 (diff) | |
download | frameworks_base-1919e5af3d8eb8bcf08e50efae2e79eaf065cf6b.zip frameworks_base-1919e5af3d8eb8bcf08e50efae2e79eaf065cf6b.tar.gz frameworks_base-1919e5af3d8eb8bcf08e50efae2e79eaf065cf6b.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/stagefright')
-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); |