diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2010-11-19 15:50:29 -0800 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2010-11-19 15:50:29 -0800 |
commit | e2ec61b23b6da2f6f0796939c3e00aa77bf17569 (patch) | |
tree | 4102e67d4f3b798899ae8a540bb89b1e6bc1d13f | |
parent | e3bef7c48d7ec13cb8c7c81dba8d775377e69bed (diff) | |
parent | dc1a26eb7870cfafe4774d0db4613025c427db23 (diff) | |
download | frameworks_base-e2ec61b23b6da2f6f0796939c3e00aa77bf17569.zip frameworks_base-e2ec61b23b6da2f6f0796939c3e00aa77bf17569.tar.gz frameworks_base-e2ec61b23b6da2f6f0796939c3e00aa77bf17569.tar.bz2 |
Merge "StagefrightMediaScanner: Call endFile() for MIDI and OGG files."
-rw-r--r-- | media/libstagefright/StagefrightMediaScanner.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp index 03287dd1..2318844 100644 --- a/media/libstagefright/StagefrightMediaScanner.cpp +++ b/media/libstagefright/StagefrightMediaScanner.cpp @@ -172,14 +172,16 @@ status_t StagefrightMediaScanner::processFile( || !strcasecmp(extension, ".rtttl") || !strcasecmp(extension, ".rtx") || !strcasecmp(extension, ".ota")) { - return HandleMIDI(path, &client); - } - - if (!strcasecmp(extension, ".ogg")) { - return HandleOGG(path, &client); - } - - if (mRetriever->setDataSource(path) == OK + status_t status = HandleMIDI(path, &client); + if (status != OK) { + return status; + } + } else if (!strcasecmp(extension, ".ogg")) { + status_t status = HandleOGG(path, &client); + if (status != OK) { + return status; + } + } else if (mRetriever->setDataSource(path) == OK && mRetriever->setMode( METADATA_MODE_METADATA_RETRIEVAL_ONLY) == OK) { const char *value; |