Mercurial > libavcodec.hg
comparison eamad.c @ 12372:914f484bb476 libavcodec
Remove use of the deprecated function avcodec_check_dimensions(), use
av_check_image_size() instead.
author | stefano |
---|---|
date | Fri, 06 Aug 2010 09:37:04 +0000 |
parents | 8b28e74de2c0 |
children | ffb3668ff7af |
comparison
equal
deleted
inserted
replaced
12371:5dffb531b1cc | 12372:914f484bb476 |
---|---|
32 #include "get_bits.h" | 32 #include "get_bits.h" |
33 #include "dsputil.h" | 33 #include "dsputil.h" |
34 #include "aandcttab.h" | 34 #include "aandcttab.h" |
35 #include "mpeg12.h" | 35 #include "mpeg12.h" |
36 #include "mpeg12data.h" | 36 #include "mpeg12data.h" |
37 #include "libavcore/imgutils.h" | |
37 | 38 |
38 #define EA_PREAMBLE_SIZE 8 | 39 #define EA_PREAMBLE_SIZE 8 |
39 #define MADk_TAG MKTAG('M', 'A', 'D', 'k') /* MAD i-frame */ | 40 #define MADk_TAG MKTAG('M', 'A', 'D', 'k') /* MAD i-frame */ |
40 #define MADm_TAG MKTAG('M', 'A', 'D', 'm') /* MAD p-frame */ | 41 #define MADm_TAG MKTAG('M', 'A', 'D', 'm') /* MAD p-frame */ |
41 #define MADe_TAG MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */ | 42 #define MADe_TAG MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */ |
258 s->height = AV_RL16(&buf[10]); | 259 s->height = AV_RL16(&buf[10]); |
259 calc_intra_matrix(t, buf[13]); | 260 calc_intra_matrix(t, buf[13]); |
260 buf += 16; | 261 buf += 16; |
261 | 262 |
262 if (avctx->width != s->width || avctx->height != s->height) { | 263 if (avctx->width != s->width || avctx->height != s->height) { |
263 if (avcodec_check_dimensions(avctx, s->width, s->height) < 0) | 264 if (av_check_image_size(s->width, s->height, 0, avctx) < 0) |
264 return -1; | 265 return -1; |
265 avcodec_set_dimensions(avctx, s->width, s->height); | 266 avcodec_set_dimensions(avctx, s->width, s->height); |
266 if (t->frame.data[0]) | 267 if (t->frame.data[0]) |
267 avctx->release_buffer(avctx, &t->frame); | 268 avctx->release_buffer(avctx, &t->frame); |
268 } | 269 } |