Resolved TODO. The current time should point to

the beginning of the next buffer. GetNextChunk()
still has the same problem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38544 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2010-09-06 18:13:58 +00:00
parent faff258d9a
commit b8b74f90f4

View File

@ -313,12 +313,9 @@ BMediaTrack::ReadFrames(void* buffer, int64* _frameCount,
result = fDecoder->Decode(buffer, _frameCount, _header, info);
if (result == B_OK) {
fCurrentFrame += *_frameCount;
// TODO: This changes the meaning of fCurrentTime from pointing
// to the next chunk start time (i.e. after seeking) to the start time
// of the last chunk. Asking the extractor for the current time will
// not work so well because of the chunk cache. But providing a
// "duration" field in the media_header could be useful.
fCurrentTime = fCurrentTime = _header->start_time;
bigtime_t framesDuration = (bigtime_t)(*_frameCount * 1000000
/ _FrameRate());
fCurrentTime = _header->start_time + framesDuration;
} else {
ERROR("BMediaTrack::ReadFrames: decoder returned error 0x%08lx (%s)\n",
result, strerror(result));