[FFmpeg-cvslog] vp8: stop using deprecated avcodec_set_dimensions
Anton Khirnov
git at videolan.org
Fri Nov 1 15:56:13 CET 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Oct 27 10:02:26 2013 +0100| [757d5e8ef98ba2ab0dd0e85a46290c4f4a7e82be] | committer: Anton Khirnov
vp8: stop using deprecated avcodec_set_dimensions
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=757d5e8ef98ba2ab0dd0e85a46290c4f4a7e82be
---
libavcodec/vp8.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 910ec20..b1b4f2d 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -114,16 +114,15 @@ static void vp8_decode_flush(AVCodecContext *avctx)
static int update_dimensions(VP8Context *s, int width, int height)
{
AVCodecContext *avctx = s->avctx;
- int i;
+ int i, ret;
if (width != s->avctx->width ||
height != s->avctx->height) {
- if (av_image_check_size(width, height, 0, s->avctx))
- return AVERROR_INVALIDDATA;
-
vp8_decode_flush_impl(s->avctx, 1);
- avcodec_set_dimensions(s->avctx, width, height);
+ ret = ff_set_dimensions(s->avctx, width, height);
+ if (ret < 0)
+ return ret;
}
s->mb_width = (s->avctx->coded_width +15) / 16;
More information about the ffmpeg-cvslog
mailing list