In the unexpected case that an extractor seeked forward while we actually
asked to seek backwards, cause us to produce silence. This fixes some occasionally very unpleasant noise after seeking. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38805 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
030345058e
commit
a92abad742
@ -690,6 +690,12 @@ MediaTrackAudioSupplier::_SeekToKeyFrameBackward(int64& position)
|
||||
position = currentPosition;
|
||||
return B_OK;
|
||||
}
|
||||
if (error == B_OK && position > wantedPosition) {
|
||||
// We asked to seek backwards, but the extractor seeked
|
||||
// forwards! Returning an error here will cause silence
|
||||
// to be produced.
|
||||
return B_ERROR;
|
||||
}
|
||||
if (error == B_OK)
|
||||
error = fMediaTrack->SeekToFrame(&position, 0);
|
||||
if (error != B_OK) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user