diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-08-06 09:37:04 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-08-06 09:37:04 +0000 |
commit | 6ce9b4310cf1eba1a356191f30460a97e6653b91 (patch) | |
tree | 4211e63439fb2ee8a0f063fe62b6ef1a4a0ad393 /libavcodec/pnm.c | |
parent | 899a507fa690e533f62e95a0c5d1caf487cf72ce (diff) | |
download | ffmpeg-6ce9b4310cf1eba1a356191f30460a97e6653b91.tar.gz |
Remove use of the deprecated function avcodec_check_dimensions(), use
av_check_image_size() instead.
Originally committed as revision 24711 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r-- | libavcodec/pnm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index cb6a7139f2..de21d6ca75 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavcore/imgutils.h" #include "avcodec.h" #include "pnm.h" @@ -101,7 +102,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) } } /* check that all tags are present */ - if (w <= 0 || h <= 0 || maxval <= 0 || depth <= 0 || tuple_type[0] == '\0' || avcodec_check_dimensions(avctx, w, h)) + if (w <= 0 || h <= 0 || maxval <= 0 || depth <= 0 || tuple_type[0] == '\0' || av_check_image_size(w, h, 0, avctx)) return -1; avctx->width = w; @@ -134,7 +135,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) return -1; pnm_get(s, buf1, sizeof(buf1)); avctx->height = atoi(buf1); - if(avcodec_check_dimensions(avctx, avctx->width, avctx->height)) + if(av_check_image_size(avctx->width, avctx->height, 0, avctx)) return -1; if (avctx->pix_fmt != PIX_FMT_MONOWHITE) { pnm_get(s, buf1, sizeof(buf1)); |