Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4892403 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "HTTPDataSource must be connected before it is usable. Fix this in the stagefright tool."

parents c7f394ee 1af34bec
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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);
        }