Mercurial > libavcodec.hg
comparison yop.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 | fdafbcef52f5 |
children | ffb3668ff7af |
comparison
equal
deleted
inserted
replaced
12371:5dffb531b1cc | 12372:914f484bb476 |
---|---|
22 * License along with FFmpeg; if not, write to the Free Software | 22 * License along with FFmpeg; if not, write to the Free Software |
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
24 */ | 24 */ |
25 | 25 |
26 #include "libavutil/intreadwrite.h" | 26 #include "libavutil/intreadwrite.h" |
27 #include "libavcore/imgutils.h" | |
27 | 28 |
28 #include "avcodec.h" | 29 #include "avcodec.h" |
29 #include "get_bits.h" | 30 #include "get_bits.h" |
30 | 31 |
31 typedef struct YopDecContext { | 32 typedef struct YopDecContext { |
82 { | 83 { |
83 YopDecContext *s = avctx->priv_data; | 84 YopDecContext *s = avctx->priv_data; |
84 s->avctx = avctx; | 85 s->avctx = avctx; |
85 | 86 |
86 if (avctx->width & 1 || avctx->height & 1 || | 87 if (avctx->width & 1 || avctx->height & 1 || |
87 avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) { | 88 av_check_image_size(avctx->width, avctx->height, 0, avctx) < 0) { |
88 av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n"); | 89 av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n"); |
89 return -1; | 90 return -1; |
90 } | 91 } |
91 | 92 |
92 avctx->pix_fmt = PIX_FMT_PAL8; | 93 avctx->pix_fmt = PIX_FMT_PAL8; |