From 4fc2c6447ff5432da131082662e0345f8772721c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 24 May 2004 15:13:23 +0000 Subject: [PATCH] 100l (avi seeking) Originally committed as revision 3155 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/avidec.c | 3 +-- libavformat/utils.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index fbc81f0135..31b5b5f2e4 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -597,8 +597,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp return -1; ast = st->priv_data; /* compute the frame number */ - frame_number = (timestamp * ast->rate) / - (ast->scale * (int64_t)AV_TIME_BASE); + frame_number = timestamp; #ifdef DEBUG_SEEK printf("timestamp=%0.3f nb_indexes=%d frame_number=%d\n", (double)timestamp / AV_TIME_BASE, diff --git a/libavformat/utils.c b/libavformat/utils.c index 88a88673ef..b60367c090 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -558,7 +558,7 @@ static void compute_frame_duration(int *pnum, int *pden, } static int64_t lsb2full(int64_t lsb, int64_t last_ts, int lsb_bits){ - int64_t mask = (1LL<