[FFmpeg-cvslog] truemotion1: stop using deprecated avcodec_set_dimensions
Anton Khirnov
git at videolan.org
Fri Nov 1 15:56:12 CET 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Oct 27 10:02:26 2013 +0100| [db92e4ea8daad70515169f4d98afef291f66c57f] | committer: Anton Khirnov
truemotion1: stop using deprecated avcodec_set_dimensions
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db92e4ea8daad70515169f4d98afef291f66c57f
---
libavcodec/truemotion1.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index c1e0863..f7be92f 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -397,15 +397,16 @@ static int truemotion1_decode_header(TrueMotion1Context *s)
new_pix_fmt = AV_PIX_FMT_RGB555; // RGB565 is supported as well
s->w >>= width_shift;
- if ((ret = av_image_check_size(s->w, s->h, 0, s->avctx)) < 0)
- return ret;
if (s->w != s->avctx->width || s->h != s->avctx->height ||
new_pix_fmt != s->avctx->pix_fmt) {
av_frame_unref(&s->frame);
s->avctx->sample_aspect_ratio = (AVRational){ 1 << width_shift, 1 };
s->avctx->pix_fmt = new_pix_fmt;
- avcodec_set_dimensions(s->avctx, s->w, s->h);
+
+ if ((ret = ff_set_dimensions(s->avctx, s->w, s->h)) < 0)
+ return ret;
+
av_fast_malloc(&s->vert_pred, &s->vert_pred_size, s->avctx->width * sizeof(unsigned int));
}
More information about the ffmpeg-cvslog
mailing list