fix(ffmpeg): AVSEEK_SIZE callback

This commit is contained in:
Adrian Shum 2022-09-09 23:21:55 +08:00
parent bcbe0f76b3
commit f11d2b351c

View file

@ -30,7 +30,7 @@ func goPacketSeek(opaque unsafe.Pointer, offset C.int64_t, whence C.int) C.int64
if !ok || ctx.seeker == nil {
return C.int64_t(ErrUnknown)
}
if whence == C.AVSEEK_SIZE && ctx.size > 0 {
if whence == C.AVSEEK_SIZE {
return C.int64_t(ctx.size)
}
n, err := ctx.seeker.Seek(int64(offset), int(whence))