dam...@chromium.org
unread,Jul 2, 2014, 7:12:24 PM7/2/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to acol...@chromium.org, wole...@chromium.org, gun...@chromium.org, chromium...@chromium.org, feature-me...@chromium.org
Reviewers: acolwell, wolenetz, gunsch,
Message:
PTAL
Description:
Mpeg2 TS: relax the spec compliancy w.r.t. the adaptation field.
BUG=None
Please review this at
https://codereview.chromium.org/364913006/
SVN Base: svn://
svn.chromium.org/chrome/trunk/src
Affected files (+4, -1 lines):
M media/formats/mp2t/ts_packet.cc
Index: media/formats/mp2t/ts_packet.cc
diff --git a/media/formats/mp2t/ts_packet.cc
b/media/formats/mp2t/ts_packet.cc
index
8463c11e33ae1ede421e06fb3f69b956dfa79ce2..361a6e06d2a838a44ad11f7115e82ab32e1f8fb3
100644
--- a/media/formats/mp2t/ts_packet.cc
+++ b/media/formats/mp2t/ts_packet.cc
@@ -203,7 +203,10 @@ bool TsPacket::ParseAdaptationField(BitReader*
bit_reader,
for (int k = 0; k < adaptation_field_remaining_size; k++) {
int stuffing_byte;
RCHECK(bit_reader->ReadBits(8, &stuffing_byte));
- RCHECK(stuffing_byte == 0xff);
+ // Unfortunately, a lot of streams exist in the field that do not fill
+ // the remaining of the adaptation field with the expected stuffing
value:
+ // do not fail if that's the case.
+ DVLOG_IF(stuffing_byte != 0xff, 1) << "Stream not spec compliant";
}
DVLOG(LOG_LEVEL_TS) << "random_access_indicator=" <<
random_access_indicator_;