Mercurial > libavcodec.hg
comparison txd.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 |
---|---|
20 * License along with FFmpeg; if not, write to the Free Software | 20 * License along with FFmpeg; if not, write to the Free Software |
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 */ | 22 */ |
23 | 23 |
24 #include "libavutil/intreadwrite.h" | 24 #include "libavutil/intreadwrite.h" |
25 #include "libavcore/imgutils.h" | |
25 #include "avcodec.h" | 26 #include "avcodec.h" |
26 #include "s3tc.h" | 27 #include "s3tc.h" |
27 | 28 |
28 typedef struct TXDContext { | 29 typedef struct TXDContext { |
29 AVFrame picture; | 30 AVFrame picture; |
77 } | 78 } |
78 | 79 |
79 if (p->data[0]) | 80 if (p->data[0]) |
80 avctx->release_buffer(avctx, p); | 81 avctx->release_buffer(avctx, p); |
81 | 82 |
82 if (avcodec_check_dimensions(avctx, w, h)) | 83 if (av_check_image_size(w, h, 0, avctx)) |
83 return -1; | 84 return -1; |
84 if (w != avctx->width || h != avctx->height) | 85 if (w != avctx->width || h != avctx->height) |
85 avcodec_set_dimensions(avctx, w, h); | 86 avcodec_set_dimensions(avctx, w, h); |
86 if (avctx->get_buffer(avctx, p) < 0) { | 87 if (avctx->get_buffer(avctx, p) < 0) { |
87 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); | 88 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |