提交 4fc2c644 编写于 作者: M Michael Niedermayer

100l (avi seeking)

Originally committed as revision 3155 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 cde073b4
......@@ -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,
......
......@@ -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<<lsb_bits)-1;
int64_t mask = lsb_bits < 64 ? (1LL<<lsb_bits)-1 : -1LL;
int64_t delta= last_ts - mask/2;
return ((lsb - delta)&mask) + delta;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册