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:
Julien BLACHE 2010-09-13 21:46:24 +02:00
parent d1af41f0e7
commit 115ded61d0

View File

@ -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;