diff options
| author | Andreas Huber <andih@google.com> | 2010-03-16 09:05:38 -0700 |
|---|---|---|
| committer | Andreas Huber <andih@google.com> | 2010-03-16 09:05:38 -0700 |
| commit | 1af34becb11ecf339511e61b7860cc6a6de848ae (patch) | |
| tree | b4ae8616e4c989e35ebcd05d9433461dd23b75a8 /cmds | |
| parent | 1a3786a3e34112e3e68e6a9b07ba72802867a002 (diff) | |
| download | frameworks_base-1af34becb11ecf339511e61b7860cc6a6de848ae.zip frameworks_base-1af34becb11ecf339511e61b7860cc6a6de848ae.tar.gz frameworks_base-1af34becb11ecf339511e61b7860cc6a6de848ae.tar.bz2 | |
HTTPDataSource must be connected before it is usable. Fix this in the stagefright tool.
Change-Id: I5313b2cb7839233d51b2d37a03b6598b0760c2e0
Diffstat (limited to 'cmds')
| -rw-r--r-- | cmds/stagefright/stagefright.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 5e2c61e..072a9d2 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -434,7 +434,11 @@ int main(int argc, char **argv) { sp<DataSource> dataSource; if (!strncasecmp("http://", filename, 7)) { dataSource = new HTTPDataSource(filename); - dataSource = new CachingDataSource(dataSource, 64 * 1024, 10); + if (((HTTPDataSource *)dataSource.get())->connect() != OK) { + fprintf(stderr, "failed to connect to HTTP server.\n"); + return -1; + } + dataSource = new CachingDataSource(dataSource, 32 * 1024, 20); } else { dataSource = new FileSource(filename); } |
