mkvparser: fix DiscardPadding extraction

the element length was being read twice; the second attempt would
consume a portion of the discard padding field often failing due to
limitations in GetUIntLength.

Change-Id: Ibbe3f082e2d05460734a0e1f7d23f3c665e3f24b
This commit is contained in:
James Zern 2014-05-30 14:44:28 -07:00
parent 1c36c24694
commit 8f2d1b3cde

View File

@ -6682,12 +6682,7 @@ long Cluster::ParseBlockGroup(long long payload_size, long long& pos,
return E_FILE_FORMAT_INVALID;
if (id == 0x35A2) { // DiscardPadding
result = GetUIntLength(pReader, pos, len);
if (result < 0) // error
return static_cast<long>(result);
status = UnserializeInt(pReader, pos, len, discard_padding);
status = UnserializeInt(pReader, pos, size, discard_padding);
if (status < 0) // error
return status;