Mercurial > libavformat.hg
diff oggparsetheora.c @ 1077:91677ac6fb19 libavformat
set stream time_base properly
author | mru |
---|---|
date | Fri, 12 May 2006 00:50:43 +0000 |
parents | 2266681a4a52 |
children | 1516dadb3bc1 |
line wrap: on
line diff
--- a/oggparsetheora.c Thu May 11 23:07:22 2006 +0000 +++ b/oggparsetheora.c Fri May 12 00:50:43 2006 +0000 @@ -79,6 +79,7 @@ skip_bits(&gb, 64); st->codec->time_base.den = get_bits(&gb, 32); st->codec->time_base.num = get_bits(&gb, 32); + st->time_base = st->codec->time_base; st->codec->sample_aspect_ratio.num = get_bits(&gb, 24); st->codec->sample_aspect_ratio.den = get_bits(&gb, 24); @@ -111,15 +112,13 @@ static uint64_t theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp) { - AVStream *st = ctx->streams[idx]; ogg_t *ogg = ctx->priv_data; ogg_stream_t *os = ogg->streams + idx; theora_params_t *thp = os->private; uint64_t iframe = gp >> thp->gpshift; uint64_t pframe = gp & thp->gpmask; - return (iframe + pframe) * AV_TIME_BASE * st->codec->time_base.num / - st->codec->time_base.den; + return iframe + pframe; } ogg_codec_t theora_codec = {