Fix issues on EBML lacing block parsing

Fix EBML lacing block parsing when attempting to parse the last frame
on single-frame videos and assertion when frame_count is lower
than actual data in the file.

Change-Id: I223e30be54970ef75126c6c4ee3401cbeb92e02f
This commit is contained in:
Leonel Togniolli 2015-04-18 23:36:38 +01:00 committed by James Zern
parent fe1e9bba6e
commit 42e5660e73

View File

@ -7141,7 +7141,8 @@ long Block::Parse(const Cluster* pCluster) {
--frame_count;
}
{
// parse last frame
if (frame_count > 0) {
assert(pos <= stop);
assert(pf < pf_end);
@ -7179,7 +7180,8 @@ long Block::Parse(const Cluster* pCluster) {
pos += f.len;
}
assert(pos == stop);
if (pos != stop)
return E_FILE_FORMAT_INVALID;
}
return 0; // success