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:
@@ -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");
|
// 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.
|
// 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)
|
if (IsEndOfFile(*start + *size) || IsEndOfData(*start + *size)) {
|
||||||
&& !IsEndOfData(*start + *size);
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return *start > 0 && *size > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user