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:
@@ -313,12 +313,9 @@ BMediaTrack::ReadFrames(void* buffer, int64* _frameCount,
|
|||||||
result = fDecoder->Decode(buffer, _frameCount, _header, info);
|
result = fDecoder->Decode(buffer, _frameCount, _header, info);
|
||||||
if (result == B_OK) {
|
if (result == B_OK) {
|
||||||
fCurrentFrame += *_frameCount;
|
fCurrentFrame += *_frameCount;
|
||||||
// TODO: This changes the meaning of fCurrentTime from pointing
|
bigtime_t framesDuration = (bigtime_t)(*_frameCount * 1000000
|
||||||
// to the next chunk start time (i.e. after seeking) to the start time
|
/ _FrameRate());
|
||||||
// of the last chunk. Asking the extractor for the current time will
|
fCurrentTime = _header->start_time + framesDuration;
|
||||||
// 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;
|
|
||||||
} else {
|
} else {
|
||||||
ERROR("BMediaTrack::ReadFrames: decoder returned error 0x%08lx (%s)\n",
|
ERROR("BMediaTrack::ReadFrames: decoder returned error 0x%08lx (%s)\n",
|
||||||
result, strerror(result));
|
result, strerror(result));
|
||||||
|
|||||||
Reference in New Issue
Block a user