mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-13 16:03:23 -05:00
Assign ms to target_pts to ensure full 64bit computation of target_pts
Clang produced interesting results without this (or casting ms to int64_t), as the seek target got mis-computed and fell short of the requested seek target in ms (ex. wanted 18569 ms -> got 555 ms).
This commit is contained in:
parent
115ded61d0
commit
75fb755db7
@ -257,7 +257,8 @@ transcode_seek(struct transcode_ctx *ctx, int ms)
|
||||
|
||||
start_time = ctx->fmtctx->streams[ctx->astream]->start_time;
|
||||
|
||||
target_pts = ms * AV_TIME_BASE / 1000;
|
||||
target_pts = ms;
|
||||
target_pts = target_pts * AV_TIME_BASE / 1000;
|
||||
target_pts = av_rescale_q(target_pts, AV_TIME_BASE_Q, ctx->fmtctx->streams[ctx->astream]->time_base);
|
||||
|
||||
if ((start_time != AV_NOPTS_VALUE) && (start_time > 0))
|
||||
|
Loading…
Reference in New Issue
Block a user