Better check for end of data

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28866 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
David McPaul 2009-01-10 01:05:39 +00:00
parent d06fb5745a
commit 2405fee747
1 changed files with 5 additions and 2 deletions

View File

@ -636,8 +636,11 @@ MP4FileReader::GetNextChunkInfo(uint32 streamIndex, uint32 pFrameNo,
// printf("start %Ld, size %ld, eof %s, eod %s\n",*start,*size, IsEndOfFile(*start + *size) ? "true" : "false", IsEndOfData(*start + *size) ? "true" : "false");
// TODO need a better method for detecting End of Data Note ChunkSize of 0 seems to be it.
return *start > 0 && *size > 0 && !IsEndOfFile(*start + *size)
&& !IsEndOfData(*start + *size);
if (IsEndOfFile(*start + *size) || IsEndOfData(*start + *size)) {
return false;
}
return *start > 0 && *size > 0;
}