summaryrefslogtreecommitdiff
path: root/libavformat/oggparsetheora.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2008-10-01 14:43:08 +0000
committerDavid Conrad <lessen42@gmail.com>2008-10-01 14:43:08 +0000
commit277e3e534be2b9390cd6f4beec89595513ec7d47 (patch)
tree6392cb203531cdfea061d6de1d7bc532a4c29f44 /libavformat/oggparsetheora.c
parent51ace5777ec505a07d627abdbfc53ce140ca74f6 (diff)
Visible width/height fields were added in Theora 3.2
Originally committed as revision 15500 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggparsetheora.c')
-rw-r--r--libavformat/oggparsetheora.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 5920e1cdcf..c5fac1db0c 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -75,14 +75,15 @@ theora_header (AVFormatContext * s, int idx)
if (version >= 0x030400)
skip_bits(&gb, 100);
+ if (version >= 0x030200) {
width = get_bits_long(&gb, 24);
height = get_bits_long(&gb, 24);
if ( width <= st->codec->width && width > st->codec->width-16
&& height <= st->codec->height && height > st->codec->height-16)
avcodec_set_dimensions(st->codec, width, height);
- if (version >= 0x030200)
skip_bits(&gb, 16);
+ }
st->codec->time_base.den = get_bits_long(&gb, 32);
st->codec->time_base.num = get_bits_long(&gb, 32);
st->time_base = st->codec->time_base;