summaryrefslogtreecommitdiff
path: root/libavformat/oggparsetheora.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-11-24 20:58:22 +0100
committerAnton Khirnov <anton@khirnov.net>2012-03-02 11:11:38 +0100
commit1bb3990b560e7ff7f46c06c14f959fe432e0b625 (patch)
treeb23877492cf9cf2739a17cec375fd8f7146a3d36 /libavformat/oggparsetheora.c
parent1d3144c318f0b6f99bf912344bb0e005b2b05708 (diff)
ogg: don't set codec timebase
Demuxers are not supposed to set it.
Diffstat (limited to 'libavformat/oggparsetheora.c')
-rw-r--r--libavformat/oggparsetheora.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 993db3ee55..d1559f4632 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -56,6 +56,7 @@ theora_header (AVFormatContext * s, int idx)
if (os->buf[os->pstart] == 0x80) {
GetBitContext gb;
int width, height;
+ AVRational timebase;
init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
@@ -85,14 +86,14 @@ theora_header (AVFormatContext * s, int idx)
skip_bits(&gb, 16);
}
- st->codec->time_base.den = get_bits_long(&gb, 32);
- st->codec->time_base.num = get_bits_long(&gb, 32);
- if (!(st->codec->time_base.num > 0 && st->codec->time_base.den > 0)) {
+ timebase.den = get_bits_long(&gb, 32);
+ timebase.num = get_bits_long(&gb, 32);
+ if (!(timebase.num > 0 && timebase.den > 0)) {
av_log(s, AV_LOG_WARNING, "Invalid time base in theora stream, assuming 25 FPS\n");
- st->codec->time_base.num = 1;
- st->codec->time_base.den = 25;
+ timebase.num = 1;
+ timebase.den = 25;
}
- avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
+ avpriv_set_pts_info(st, 64, timebase.num, timebase.den);
st->sample_aspect_ratio.num = get_bits_long(&gb, 24);
st->sample_aspect_ratio.den = get_bits_long(&gb, 24);