comparison xsubdec.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
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 "get_bits.h" 23 #include "get_bits.h"
23 #include "bytestream.h" 24 #include "bytestream.h"
24 25
25 static av_cold int decode_init(AVCodecContext *avctx) { 26 static av_cold int decode_init(AVCodecContext *avctx) {
74 buf += 27; 75 buf += 27;
75 76
76 // read header 77 // read header
77 w = bytestream_get_le16(&buf); 78 w = bytestream_get_le16(&buf);
78 h = bytestream_get_le16(&buf); 79 h = bytestream_get_le16(&buf);
79 if (avcodec_check_dimensions(avctx, w, h) < 0) 80 if (av_check_image_size(w, h, 0, avctx) < 0)
80 return -1; 81 return -1;
81 x = bytestream_get_le16(&buf); 82 x = bytestream_get_le16(&buf);
82 y = bytestream_get_le16(&buf); 83 y = bytestream_get_le16(&buf);
83 // skip bottom right position, it gives no new information 84 // skip bottom right position, it gives no new information
84 bytestream_get_le16(&buf); 85 bytestream_get_le16(&buf);