diff options
| author | Andreas Huber <andih@google.com> | 2009-10-09 14:11:28 -0700 |
|---|---|---|
| committer | Andreas Huber <andih@google.com> | 2009-10-13 09:46:46 -0700 |
| commit | cfd55579c2e20514b181809dfaf30bd6f7e04c7e (patch) | |
| tree | 7340b11072bf029da5619f6aec3bdef10cd42d97 /cmds | |
| parent | d5ad08bd4230c2f5d58969c624c39a3f5a2019d1 (diff) | |
| download | frameworks_base-cfd55579c2e20514b181809dfaf30bd6f7e04c7e.zip frameworks_base-cfd55579c2e20514b181809dfaf30bd6f7e04c7e.tar.gz frameworks_base-cfd55579c2e20514b181809dfaf30bd6f7e04c7e.tar.bz2 | |
OMXCodec now notifies the reader of changes in the output format by returning a special result/error code.
Diffstat (limited to 'cmds')
| -rw-r--r-- | cmds/stagefright/stagefright.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 6674620..4d4d013 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -71,7 +71,12 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) { options.clearSeekTo(); bool shouldSeek = false; - if (err != OK) { + if (err == INFO_FORMAT_CHANGED) { + CHECK_EQ(buffer, NULL); + + printf("format changed.\n"); + continue; + } else if (err != OK) { printf("reached EOF.\n"); shouldSeek = true; @@ -136,6 +141,12 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) { if (err != OK) { CHECK_EQ(buffer, NULL); + + if (err == INFO_FORMAT_CHANGED) { + printf("format changed.\n"); + continue; + } + break; } |
