Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:zergon321/reisen
Browse files Browse the repository at this point in the history
Just forgot to pull in advance LOL.
  • Loading branch information
zergon321 committed Jan 1, 2022
2 parents f9ab193 + 178a0ea commit 05a1f91
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions platform_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ func bufferSize(maxBufferSize C.int) C.ulong {
func channelLayout(audio *AudioStream) C.longlong {
return C.longlong(audio.codecCtx.channel_layout)
}

func rewindPosition(dur int64) C.longlong {
return C.longlong(dur)
}
4 changes: 4 additions & 0 deletions platform_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ func bufferSize(maxBufferSize C.int) C.ulong {
func channelLayout(audio *AudioStream) C.long {
return C.long(audio.codecCtx.channel_layout)
}

func rewindPosition(dur int64) C.long {
return C.long(dur)
}
4 changes: 4 additions & 0 deletions platform_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ func bufferSize(maxBufferSize C.int) C.ulonglong {
func channelLayout(audio *AudioStream) C.longlong {
return C.longlong(audio.codecCtx.channel_layout)
}

func rewindPosition(dur int64) C.longlong {
return C.longlong(dur)
}
2 changes: 1 addition & 1 deletion stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (stream *baseStream) Rewind(t time.Duration) error {
dur := int64(seconds * factor)

status := C.av_seek_frame(stream.media.ctx,
stream.inner.index, C.long(dur),
stream.inner.index, rewindPosition(dur),
C.AVSEEK_FLAG_FRAME|C.AVSEEK_FLAG_BACKWARD)

if status < 0 {
Expand Down

0 comments on commit 05a1f91

Please sign in to comment.