summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorHiroshi Takekawa <sian@big.or.jp>2010-11-06 18:28:11 +0900
committerPatrick Jacques <kernelzilla@kinetic-computing.com>2010-11-08 20:29:03 -0700
commit3d0965ba5e7ba0cc67068bd6b876ff482981e22b (patch)
treec001222d925687a29278ab3d9ea8fd6fbd6433ba /media
parentdc4b5a6e11d50898c06e650a99517e9406b56035 (diff)
downloadframeworks_base-3d0965ba5e7ba0cc67068bd6b876ff482981e22b.zip
frameworks_base-3d0965ba5e7ba0cc67068bd6b876ff482981e22b.tar.gz
frameworks_base-3d0965ba5e7ba0cc67068bd6b876ff482981e22b.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. Added FLAC to the list to help with CM issue #2002 Change-Id: I072e79d81dce1fec63297d2b5d2b870a72e5b66e
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/StagefrightMediaScanner.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp
index 25236cf..667482b 100644
--- a/media/libstagefright/StagefrightMediaScanner.cpp
+++ b/media/libstagefright/StagefrightMediaScanner.cpp
@@ -236,6 +236,7 @@ status_t StagefrightMediaScanner::processFile(
return UNKNOWN_ERROR;
}
+ status_t status;
if (!strcasecmp(extension, ".mid")
|| !strcasecmp(extension, ".smf")
|| !strcasecmp(extension, ".imy")
@@ -244,15 +245,24 @@ status_t StagefrightMediaScanner::processFile(
|| !strcasecmp(extension, ".rtttl")
|| !strcasecmp(extension, ".rtx")
|| !strcasecmp(extension, ".ota")) {
- return HandleMIDI(path, &client);
+ status = HandleMIDI(path, &client);
+ if (status != OK)
+ return status;
+ goto endfile;
}
if (!strcasecmp(extension, ".ogg")) {
- return HandleOGG(path, &client);
+ status = HandleOGG(path, &client);
+ if (status != OK)
+ return status;
+ goto endfile;
}
if (!strcasecmp(extension, ".flac")) {
- return HandleFLAC(path, &client);
+ status = HandleFLAC(path, &client);
+ if (status != OK)
+ return status;
+ goto endfile;
}
if (mRetriever->setDataSource(path) == OK
@@ -290,7 +300,7 @@ status_t StagefrightMediaScanner::processFile(
}
}
}
-
+ endfile:
client.endFile();
return OK;