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 | 7f281f87670c63775ea1ae8b24af31822d5ad416 (patch) | |
tree | c04964f9bc176627df0eec3688b00bc17479bc06 /cmds/stagefright | |
parent | 0bf3921522461b1c7d321d0c667c1020ab3110bc (diff) | |
download | frameworks_av-7f281f87670c63775ea1ae8b24af31822d5ad416.zip frameworks_av-7f281f87670c63775ea1ae8b24af31822d5ad416.tar.gz frameworks_av-7f281f87670c63775ea1ae8b24af31822d5ad416.tar.bz2 |
OMXCodec now notifies the reader of changes in the output format by returning a special result/error code.
Diffstat (limited to 'cmds/stagefright')
-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; } |