Mercurial > libavcodec.hg
comparison ptx.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 typedef struct PTXContext { | 26 typedef struct PTXContext { |
26 AVFrame picture; | 27 AVFrame picture; |
27 } PTXContext; | 28 } PTXContext; |
62 buf += offset; | 63 buf += offset; |
63 | 64 |
64 if (p->data[0]) | 65 if (p->data[0]) |
65 avctx->release_buffer(avctx, p); | 66 avctx->release_buffer(avctx, p); |
66 | 67 |
67 if (avcodec_check_dimensions(avctx, w, h)) | 68 if (av_check_image_size(w, h, 0, avctx)) |
68 return -1; | 69 return -1; |
69 if (w != avctx->width || h != avctx->height) | 70 if (w != avctx->width || h != avctx->height) |
70 avcodec_set_dimensions(avctx, w, h); | 71 avcodec_set_dimensions(avctx, w, h); |
71 if (avctx->get_buffer(avctx, p) < 0) { | 72 if (avctx->get_buffer(avctx, p) < 0) { |
72 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); | 73 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |