summaryrefslogtreecommitdiff
path: root/libavformat/oggparsetheora.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-10-27 09:39:14 +0100
committerAnton Khirnov <anton@khirnov.net>2013-10-31 20:14:14 +0100
commitce6949d3a0607eb318dc2872553110df934e9720 (patch)
tree85d6777d23064851555b93477536fc9d7afc26a5 /libavformat/oggparsetheora.c
parent7644f5a80787c9b608b82873604805d7e38a6a18 (diff)
oggparsetheora: stop using deprecated avcodec_set_dimensions
Diffstat (limited to 'libavformat/oggparsetheora.c')
-rw-r--r--libavformat/oggparsetheora.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 961096edaa..035bdc24e2 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -58,7 +58,6 @@ static int theora_header(AVFormatContext *s, int idx)
switch (os->buf[os->pstart]) {
case 0x80: {
GetBitContext gb;
- int width, height;
AVRational timebase;
init_get_bits(&gb, os->buf + os->pstart, os->psize * 8);
@@ -73,19 +72,20 @@ static int theora_header(AVFormatContext *s, int idx)
return AVERROR(ENOSYS);
}
- width = get_bits(&gb, 16) << 4;
- height = get_bits(&gb, 16) << 4;
- avcodec_set_dimensions(st->codec, width, height);
+ st->codec->width = get_bits(&gb, 16) << 4;
+ st->codec->height = get_bits(&gb, 16) << 4;
if (thp->version >= 0x030400)
skip_bits(&gb, 100);
if (thp->version >= 0x030200) {
- width = get_bits_long(&gb, 24);
- height = get_bits_long(&gb, 24);
+ int width = get_bits_long(&gb, 24);
+ int 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);
+ height <= st->codec->height && height > st->codec->height - 16) {
+ st->codec->width = width;
+ st->codec->height = height;
+ }
skip_bits(&gb, 16);
}