comparison iff.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 ee740a4e80c5
children ffb3668ff7af
comparison
equal deleted inserted replaced
12371:5dffb531b1cc 12372:914f484bb476
23 /** 23 /**
24 * @file 24 * @file
25 * IFF PBM/ILBM bitmap decoder 25 * IFF PBM/ILBM bitmap decoder
26 */ 26 */
27 27
28 #include "libavcore/imgutils.h"
28 #include "bytestream.h" 29 #include "bytestream.h"
29 #include "avcodec.h" 30 #include "avcodec.h"
30 #include "get_bits.h" 31 #include "get_bits.h"
31 #include "iff.h" 32 #include "iff.h"
32 33
158 avctx->pix_fmt = PIX_FMT_BGR32; 159 avctx->pix_fmt = PIX_FMT_BGR32;
159 } else { 160 } else {
160 return AVERROR_INVALIDDATA; 161 return AVERROR_INVALIDDATA;
161 } 162 }
162 163
163 if ((err = avcodec_check_dimensions(avctx, avctx->width, avctx->height))) 164 if ((err = av_check_image_size(avctx->width, avctx->height, 0, avctx)))
164 return err; 165 return err;
165 s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary 166 s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary
166 s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE); 167 s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE);
167 if (!s->planebuf) 168 if (!s->planebuf)
168 return AVERROR(ENOMEM); 169 return AVERROR(ENOMEM);