Mercurial > libavcodec.hg
comparison nuv.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 |
---|---|
21 #include <stdio.h> | 21 #include <stdio.h> |
22 #include <stdlib.h> | 22 #include <stdlib.h> |
23 | 23 |
24 #include "libavutil/bswap.h" | 24 #include "libavutil/bswap.h" |
25 #include "libavutil/lzo.h" | 25 #include "libavutil/lzo.h" |
26 #include "libavcore/imgutils.h" | |
26 #include "avcodec.h" | 27 #include "avcodec.h" |
27 #include "dsputil.h" | 28 #include "dsputil.h" |
28 #include "rtjpeg.h" | 29 #include "rtjpeg.h" |
29 | 30 |
30 typedef struct { | 31 typedef struct { |
109 width = (width + 1) & ~1; | 110 width = (width + 1) & ~1; |
110 height = (height + 1) & ~1; | 111 height = (height + 1) & ~1; |
111 if (quality >= 0) | 112 if (quality >= 0) |
112 get_quant_quality(c, quality); | 113 get_quant_quality(c, quality); |
113 if (width != c->width || height != c->height) { | 114 if (width != c->width || height != c->height) { |
114 if (avcodec_check_dimensions(avctx, height, width) < 0) | 115 if (av_check_image_size(height, width, 0, avctx) < 0) |
115 return 0; | 116 return 0; |
116 avctx->width = c->width = width; | 117 avctx->width = c->width = width; |
117 avctx->height = c->height = height; | 118 avctx->height = c->height = height; |
118 c->decomp_size = c->height * c->width * 3 / 2; | 119 c->decomp_size = c->height * c->width * 3 / 2; |
119 c->decomp_buf = av_realloc(c->decomp_buf, c->decomp_size + AV_LZO_OUTPUT_PADDING); | 120 c->decomp_buf = av_realloc(c->decomp_buf, c->decomp_size + AV_LZO_OUTPUT_PADDING); |