diff options
author | Nick Chalko <nchalko@google.com> | 2017-05-09 14:07:44 -0700 |
---|---|---|
committer | Nick Chalko <nchalko@google.com> | 2017-05-10 09:49:18 -0700 |
commit | 0550a7221be0581b0bd421a9d70400ff8699a6e7 (patch) | |
tree | 14d9836ff9283690321c166560ee3450792236ad /src/com/android/tv/tuner/ts/SectionParser.java | |
parent | 430c2be3b91676005fdd243553e38acff8dfc3de (diff) | |
download | TV-0550a7221be0581b0bd421a9d70400ff8699a6e7.tar.gz |
Sync to ub-tv-dev at lost+android-o-preview-3android-n-iot-preview-4n-iot-preview-4
hash 550cbec17259717c5453f6be1eb05736ba10ef1d
Bug: 37849928
Test: tested on vendor branch
Change-Id: I82190481d2bcef2b89e78414b6b92ed97720749d
Merged-In: I4199ec04cacb4a78be58b85302a39d917658dc28
Diffstat (limited to 'src/com/android/tv/tuner/ts/SectionParser.java')
-rw-r--r-- | src/com/android/tv/tuner/ts/SectionParser.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/tv/tuner/ts/SectionParser.java b/src/com/android/tv/tuner/ts/SectionParser.java index 5d3e728a..fe972cd1 100644 --- a/src/com/android/tv/tuner/ts/SectionParser.java +++ b/src/com/android/tv/tuner/ts/SectionParser.java @@ -367,6 +367,10 @@ public class SectionParser { mParsedEttItems.clear(); } + public void resetVersionNumbers() { + mSectionVersionMap.clear(); + } + private void parseSection(byte[] data) { if (!checkSanity(data)) { Log.d(TAG, "Bad CRC!"); @@ -510,10 +514,8 @@ public class SectionParser { pos += 11 + descriptorsLength; results.add(new MgtItem(tableType, tableTypePid)); } - if ((data[pos] & 0xf0) != 0xf0) { - Log.e(TAG, "Broken MGT."); - return false; - } + // Skip the remaining descriptor part which we don't use. + if (mListener != null) { mListener.onMgtParsed(results); } @@ -717,6 +719,9 @@ public class SectionParser { if (audioDescriptor.getLanguage() != null) { audioTrack.language = audioDescriptor.getLanguage(); } + if (audioTrack.language == null) { + audioTrack.language = ""; + } audioTrack.audioType = AtscAudioTrack.AUDIOTYPE_UNDEFINED; audioTrack.channelCount = audioDescriptor.getNumChannels(); audioTrack.sampleRate = audioDescriptor.getSampleRate(); @@ -948,6 +953,7 @@ public class SectionParser { pos += 3; boolean ccType = (data[pos] & 0x80) != 0; if (!ccType) { + pos +=3; continue; } int captionServiceNumber = data[pos] & 0x3f; |