Mercurial > libavcodec.hg
comparison pngdec.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 |
---|---|
16 * | 16 * |
17 * You should have received a copy of the GNU Lesser General Public | 17 * You should have received a copy of the GNU Lesser General Public |
18 * License along with FFmpeg; if not, write to the Free Software | 18 * License along with FFmpeg; if not, write to the Free Software |
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 */ | 20 */ |
21 #include "libavcore/imgutils.h" | |
21 #include "avcodec.h" | 22 #include "avcodec.h" |
22 #include "bytestream.h" | 23 #include "bytestream.h" |
23 #include "png.h" | 24 #include "png.h" |
24 #include "dsputil.h" | 25 #include "dsputil.h" |
25 | 26 |
439 case MKTAG('I', 'H', 'D', 'R'): | 440 case MKTAG('I', 'H', 'D', 'R'): |
440 if (length != 13) | 441 if (length != 13) |
441 goto fail; | 442 goto fail; |
442 s->width = bytestream_get_be32(&s->bytestream); | 443 s->width = bytestream_get_be32(&s->bytestream); |
443 s->height = bytestream_get_be32(&s->bytestream); | 444 s->height = bytestream_get_be32(&s->bytestream); |
444 if(avcodec_check_dimensions(avctx, s->width, s->height)){ | 445 if(av_check_image_size(s->width, s->height, 0, avctx)){ |
445 s->width= s->height= 0; | 446 s->width= s->height= 0; |
446 goto fail; | 447 goto fail; |
447 } | 448 } |
448 s->bit_depth = *s->bytestream++; | 449 s->bit_depth = *s->bytestream++; |
449 s->color_type = *s->bytestream++; | 450 s->color_type = *s->bytestream++; |