From 9297e303c51fca9714d474b873e92418ae460b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 1 Sep 2010 15:54:06 +0000 Subject: [PATCH] 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 --- src/kits/media/MediaTrack.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kits/media/MediaTrack.cpp b/src/kits/media/MediaTrack.cpp index 48709f840d..b4d9545945 100644 --- a/src/kits/media/MediaTrack.cpp +++ b/src/kits/media/MediaTrack.cpp @@ -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; }