diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-01 13:15:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-01 13:15:21 +0100 |
commit | 51c5768cca3b69c6ff5e0e252d0c6c7e1e0feb82 (patch) | |
tree | 586c3de95fb7e5cea6fe1770c9dac7b59190245d | |
parent | 7b91e9cf5dc7b46216aa4da79943aecf9425ab04 (diff) | |
parent | ce6949d3a0607eb318dc2872553110df934e9720 (diff) | |
download | ffmpeg-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.c | 16 |
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); } |