mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
Move code around, no functional changes
Assign start_time right at the start, making the target_pts computation more obvious wrt start_time and showing the symmetry of the target_pts and got_pts computations.
This commit is contained in:
parent
d1af41f0e7
commit
115ded61d0
@ -255,11 +255,11 @@ transcode_seek(struct transcode_ctx *ctx, int ms)
|
||||
int flags;
|
||||
int ret;
|
||||
|
||||
start_time = ctx->fmtctx->streams[ctx->astream]->start_time;
|
||||
|
||||
target_pts = ms * AV_TIME_BASE / 1000;
|
||||
target_pts = av_rescale_q(target_pts, AV_TIME_BASE_Q, ctx->fmtctx->streams[ctx->astream]->time_base);
|
||||
|
||||
start_time = ctx->fmtctx->streams[ctx->astream]->start_time;
|
||||
|
||||
if ((start_time != AV_NOPTS_VALUE) && (start_time > 0))
|
||||
target_pts += start_time;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user