Signal E_BUFFER_NOT_FULL in EBMLHeader::Parse
When trying to read the ebml id, signal E_BUFFER_NOT_FULL if it occurs rather than returning E_FILE_FORMAT_INVALID (helps in case of incremental parsing). Makes this return path consistent with other return paths in the function. Change-Id: I4b6ce3f0ba856959fa97f0f6ffb61994f3f2ffc6
This commit is contained in:
@@ -544,6 +544,9 @@ long long EBMLHeader::Parse(IMkvReader* pReader, long long& pos) {
|
||||
long len = 0;
|
||||
const long long ebml_id = ReadID(pReader, pos, len);
|
||||
|
||||
if (ebml_id == E_BUFFER_NOT_FULL)
|
||||
return E_BUFFER_NOT_FULL;
|
||||
|
||||
// TODO(tomfinegan): Move Matroska ID constants into a common namespace.
|
||||
if (len != 4 || ebml_id != mkvmuxer::kMkvEBML)
|
||||
return E_FILE_FORMAT_INVALID;
|
||||
|
||||
Reference in New Issue
Block a user