diff --git a/src/transcode.c b/src/transcode.c index 503ff3bf..d9a67992 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -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))