diff options
author | Hiroshi Takekawa <sian@big.or.jp> | 2010-11-06 18:28:11 +0900 |
---|---|---|
committer | Hiroshi Takekawa <sian@big.or.jp> | 2010-11-19 12:14:37 +0900 |
commit | 6ed70d2d41f9929d1c3f5179d947766495f9efe5 (patch) | |
tree | fc66bda3fac2b194c64b19ba4747d0408f011e43 /media/libstagefright/StagefrightMediaScanner.cpp | |
parent | cf6a8d23345a6e54834e53b1eb7e465f3cb5e914 (diff) | |
download | frameworks_av-6ed70d2d41f9929d1c3f5179d947766495f9efe5.zip frameworks_av-6ed70d2d41f9929d1c3f5179d947766495f9efe5.tar.gz frameworks_av-6ed70d2d41f9929d1c3f5179d947766495f9efe5.tar.bz2 |
StagefrightMediaScanner: Call endFile() for MIDI and OGG files.
addStringTag() caches non-ascii metadata strings for later
processing, and then endFile() will be called at the end of
processFile() to convert non-ascii strings from locale's charset
to utf-8 if required.
Stagefright's processFile() failed to call endFile() when the
processing file is a MIDI file or an OGG file. This patch fixes
this problem to populate metadata correctly.
Reviewed by: Brad Fitzpatrick, Marco Nelissen.
Change-Id: I072e79d81dce1fec63297d2b5d2b870a72e5b66e
Diffstat (limited to 'media/libstagefright/StagefrightMediaScanner.cpp')
-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 03287dd..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; |