Mercurial > libavformat.hg
changeset 466:0dd5b381fc9a libavformat
100l (avi seeking)
author | michael |
---|---|
date | Mon, 24 May 2004 15:13:23 +0000 |
parents | 83eb268d3b89 |
children | 40069a91d1a0 |
files | avidec.c utils.c |
diffstat | 2 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/avidec.c Mon May 24 13:08:00 2004 +0000 +++ b/avidec.c Mon May 24 15:13:23 2004 +0000 @@ -597,8 +597,7 @@ 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,
--- a/utils.c Mon May 24 13:08:00 2004 +0000 +++ b/utils.c Mon May 24 15:13:23 2004 +0000 @@ -558,7 +558,7 @@ } 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; }