Merge "Read track language information from Matroska files"
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp
index bea4ced..6135b59 100644
--- a/media/libstagefright/matroska/MatroskaExtractor.cpp
+++ b/media/libstagefright/matroska/MatroskaExtractor.cpp
@@ -1399,6 +1399,14 @@
continue;
}
+ const char *language = track->GetLanguage();
+ if (language != NULL) {
+ char lang[4];
+ strncpy(lang, language, 3);
+ lang[3] = '\0';
+ meta->setCString(kKeyMediaLanguage, lang);
+ }
+
if (err != OK) {
ALOGE("skipping track, codec specific data was malformed.");
continue;