aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp3.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 /libavcodec/vp3.c
parent51ace5777ec505a07d627abdbfc53ce140ca74f6 (diff)
downloadffmpeg-277e3e534be2b9390cd6f4beec89595513ec7d47.tar.gz
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 'libavcodec/vp3.c')
-rw-r--r--libavcodec/vp3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index b291cb1189..e01ceed237 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2078,8 +2078,8 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
av_log(avctx, AV_LOG_DEBUG, "Old (<alpha3) Theora bitstream, flipped image\n");
}
- s->width = get_bits(gb, 16) << 4;
- s->height = get_bits(gb, 16) << 4;
+ visible_width = s->width = get_bits(gb, 16) << 4;
+ visible_height = s->height = get_bits(gb, 16) << 4;
if(avcodec_check_dimensions(avctx, s->width, s->height)){
av_log(avctx, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n", s->width, s->height);
@@ -2096,10 +2096,10 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
skip_bits(gb, 32); /* total number of macroblocks in a frame */
}
+ if (s->theora >= 0x030200) {
visible_width = get_bits_long(gb, 24);
visible_height = get_bits_long(gb, 24);
- if (s->theora >= 0x030200) {
skip_bits(gb, 8); /* offset x */
skip_bits(gb, 8); /* offset y */
}