summaryrefslogtreecommitdiff
path: root/libavformat/oggparsetheora.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-05-12 00:50:43 +0000
committerMåns Rullgård <mans@mansr.com>2006-05-12 00:50:43 +0000
commit3644cb8ff9e8603859e74ebf2d0ed6eff5bef551 (patch)
tree0097e3306d2b805c44772cb8a982a7ada2dfe882 /libavformat/oggparsetheora.c
parentb8d10977f435ef7de6a90c8545a419192b8e83c6 (diff)
set stream time_base properly
Originally committed as revision 5367 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggparsetheora.c')
-rw-r--r--libavformat/oggparsetheora.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 2f35d1b73c..fcd9dc132c 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -79,6 +79,7 @@ theora_header (AVFormatContext * s, int idx)
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 @@ theora_header (AVFormatContext * s, int idx)
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 = {