Do not override the seek frame which the extractor may

have adjusted. (The API is somewhat silly, since Decoders
can't really do anything with the seek frame, it can only
be told to them. But current decoders will assign the seeked
frame from the wanted frame, which would override the seeked
frame from the extractor... the API should be fixed.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38496 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2010-09-01 15:54:06 +00:00
parent 3a82446b9a
commit 9297e303c5

View File

@ -422,6 +422,7 @@ BMediaTrack::SeekToFrame(int64 *inout_frame, int32 flags)
// can do is "reset" their decoder state, since they are made
// aware of the fact that there will be a jump in the data. Maybe
// rename the codec method?
seekFrame = frame;
result = fDecoder->Seek(seekTo, seekFrame, &frame, 0, &time);
if (result != B_OK) {
ERROR("BMediaTrack::SeekToFrame: decoder seek failed\n");
@ -440,7 +441,8 @@ BMediaTrack::SeekToFrame(int64 *inout_frame, int32 flags)
fCurrentFrame = frame;
fCurrentTime = time;
PRINT(1, "BMediaTrack::SeekToTime SeekToFrame, requested %Ld, result %Ld\n", seekFrame, *inout_frame);
PRINT(1, "BMediaTrack::SeekToTime SeekToFrame, requested %Ld, "
"result %Ld\n", seekFrame, *inout_frame);
return B_OK;
}