aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-01 13:15:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-01 13:15:21 +0100
commit51c5768cca3b69c6ff5e0e252d0c6c7e1e0feb82 (patch)
tree586c3de95fb7e5cea6fe1770c9dac7b59190245d
parent7b91e9cf5dc7b46216aa4da79943aecf9425ab04 (diff)
parentce6949d3a0607eb318dc2872553110df934e9720 (diff)
downloadffmpeg-51c5768cca3b69c6ff5e0e252d0c6c7e1e0feb82.tar.gz
Merge commit 'ce6949d3a0607eb318dc2872553110df934e9720'
* commit 'ce6949d3a0607eb318dc2872553110df934e9720': oggparsetheora: stop using deprecated avcodec_set_dimensions Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/oggparsetheora.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 0a0ea06785..6458b97bc0 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);
}