Mercurial > libavcodec.hg
comparison mjpegdec.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 | b31e6ace12f6 |
comparison
equal
deleted
inserted
replaced
12371:5dffb531b1cc | 12372:914f484bb476 |
---|---|
31 */ | 31 */ |
32 | 32 |
33 //#define DEBUG | 33 //#define DEBUG |
34 #include <assert.h> | 34 #include <assert.h> |
35 | 35 |
36 #include "libavcore/imgutils.h" | |
36 #include "avcodec.h" | 37 #include "avcodec.h" |
37 #include "dsputil.h" | 38 #include "dsputil.h" |
38 #include "mjpeg.h" | 39 #include "mjpeg.h" |
39 #include "mjpegdec.h" | 40 #include "mjpegdec.h" |
40 #include "jpeglsdec.h" | 41 #include "jpeglsdec.h" |
216 //HACK for odd_height.mov | 217 //HACK for odd_height.mov |
217 if(s->interlaced && s->width == width && s->height == height + 1) | 218 if(s->interlaced && s->width == width && s->height == height + 1) |
218 height= s->height; | 219 height= s->height; |
219 | 220 |
220 av_log(s->avctx, AV_LOG_DEBUG, "sof0: picture: %dx%d\n", width, height); | 221 av_log(s->avctx, AV_LOG_DEBUG, "sof0: picture: %dx%d\n", width, height); |
221 if(avcodec_check_dimensions(s->avctx, width, height)) | 222 if(av_check_image_size(width, height, 0, s->avctx)) |
222 return -1; | 223 return -1; |
223 | 224 |
224 nb_components = get_bits(&s->gb, 8); | 225 nb_components = get_bits(&s->gb, 8); |
225 if (nb_components <= 0 || | 226 if (nb_components <= 0 || |
226 nb_components > MAX_COMPONENTS) | 227 nb_components > MAX_COMPONENTS) |