diff options
author | Insun Kang <insun@google.com> | 2012-09-25 20:22:25 +0900 |
---|---|---|
committer | James Dong <jdong@google.com> | 2013-01-17 14:33:21 -0800 |
commit | 2ba042ff8a8bb5aa0320580119771e11e64ba2cd (patch) | |
tree | 830261e009471e01dc99cbafdbb6e5e5ed7d0170 /media/libstagefright | |
parent | 2e4664677d72ce54201d3fd0beb0e10280add93c (diff) | |
download | frameworks_av-2ba042ff8a8bb5aa0320580119771e11e64ba2cd.zip frameworks_av-2ba042ff8a8bb5aa0320580119771e11e64ba2cd.tar.gz frameworks_av-2ba042ff8a8bb5aa0320580119771e11e64ba2cd.tar.bz2 |
Bug fix: set 'und' as default metadata language info for srt.
o Previously, it leaves language code empty and it is inconsistent with
other code which gives 'und'. As a result, selected SRT track returned
empty language info. With this fix, it returns 'und'.
Bug: 7227230
TESTED=runtest -d cts-media -c android.media.cts.MediaPlayerTest -m
testGetTrackInfo
Change-Id: I225848f029637dd782c376e0d770dddd5c849550
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/timedtext/TimedTextSRTSource.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/media/libstagefright/timedtext/TimedTextSRTSource.cpp b/media/libstagefright/timedtext/TimedTextSRTSource.cpp index eac23ba..2ac1e72 100644 --- a/media/libstagefright/timedtext/TimedTextSRTSource.cpp +++ b/media/libstagefright/timedtext/TimedTextSRTSource.cpp @@ -36,6 +36,9 @@ TimedTextSRTSource::TimedTextSRTSource(const sp<DataSource>& dataSource) : mSource(dataSource), mMetaData(new MetaData), mIndex(0) { + // TODO: Need to detect the language, because SRT doesn't give language + // information explicitly. + mMetaData->setCString(kKeyMediaLanguage, "und"); } TimedTextSRTSource::~TimedTextSRTSource() { @@ -46,14 +49,10 @@ status_t TimedTextSRTSource::start() { if (err != OK) { reset(); } - // TODO: Need to detect the language, because SRT doesn't give language - // information explicitly. - mMetaData->setCString(kKeyMediaLanguage, ""); return err; } void TimedTextSRTSource::reset() { - mMetaData->clear(); mTextVector.clear(); mIndex = 0; } |