summaryrefslogtreecommitdiff
path: root/libavformat/oggparseogm.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/oggparseogm.c
parentb8d10977f435ef7de6a90c8545a419192b8e83c6 (diff)
set stream time_base properly
Originally committed as revision 5367 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggparseogm.c')
-rw-r--r--libavformat/oggparseogm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c
index 6468bdf260..0e25dcc1eb 100644
--- a/libavformat/oggparseogm.c
+++ b/libavformat/oggparseogm.c
@@ -48,9 +48,12 @@ ogm_header(AVFormatContext *s, int idx)
p++;
if(*p == 'v'){
+ int tag;
st->codec->codec_type = CODEC_TYPE_VIDEO;
p += 8;
- st->codec->codec_id = codec_get_bmp_id(le2me_32(unaligned32(p)));
+ tag = le2me_32(unaligned32(p));
+ st->codec->codec_id = codec_get_bmp_id(tag);
+ st->codec->codec_tag = tag;
} else {
int cid;
st->codec->codec_type = CODEC_TYPE_AUDIO;
@@ -85,6 +88,8 @@ ogm_header(AVFormatContext *s, int idx)
p += 2; /* block_align */
st->codec->bit_rate = le2me_32(unaligned32(p)) * 8;
st->codec->sample_rate = spu * 10000000 / time_unit;
+ st->time_base.num = 1;
+ st->time_base.den = st->codec->sample_rate;
}
return 1;