From 115ded61d0c81f5d13fbcbb1d6edccd5946efc51 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Mon, 13 Sep 2010 21:46:24 +0200 Subject: [PATCH] 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. --- src/transcode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transcode.c b/src/transcode.c index 30d3b807..503ff3bf 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -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;