Mercurial > libavcodec.hg
comparison sunrast.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 | 8a4984c5cacc |
children | ffb3668ff7af |
comparison
equal
deleted
inserted
replaced
12371:5dffb531b1cc | 12372:914f484bb476 |
---|---|
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 | 21 |
22 #include "libavutil/intreadwrite.h" | 22 #include "libavutil/intreadwrite.h" |
23 #include "libavcore/imgutils.h" | |
23 #include "avcodec.h" | 24 #include "avcodec.h" |
24 | 25 |
25 #define RT_OLD 0 | 26 #define RT_OLD 0 |
26 #define RT_STANDARD 1 | 27 #define RT_STANDARD 1 |
27 #define RT_BYTE_ENCODED 2 | 28 #define RT_BYTE_ENCODED 2 |
95 } | 96 } |
96 | 97 |
97 if (p->data[0]) | 98 if (p->data[0]) |
98 avctx->release_buffer(avctx, p); | 99 avctx->release_buffer(avctx, p); |
99 | 100 |
100 if (avcodec_check_dimensions(avctx, w, h)) | 101 if (av_check_image_size(w, h, 0, avctx)) |
101 return -1; | 102 return -1; |
102 if (w != avctx->width || h != avctx->height) | 103 if (w != avctx->width || h != avctx->height) |
103 avcodec_set_dimensions(avctx, w, h); | 104 avcodec_set_dimensions(avctx, w, h); |
104 if (avctx->get_buffer(avctx, p) < 0) { | 105 if (avctx->get_buffer(avctx, p) < 0) { |
105 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); | 106 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |