comparison rv40.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 570816e8d347
children ffb3668ff7af
comparison
equal deleted inserted replaced
12371:5dffb531b1cc 12372:914f484bb476
22 /** 22 /**
23 * @file 23 * @file
24 * RV40 decoder 24 * RV40 decoder
25 */ 25 */
26 26
27 #include "libavcore/imgutils.h"
28
27 #include "avcodec.h" 29 #include "avcodec.h"
28 #include "dsputil.h" 30 #include "dsputil.h"
29 #include "mpegvideo.h" 31 #include "mpegvideo.h"
30 #include "golomb.h" 32 #include "golomb.h"
31 33
140 si->vlc_set = get_bits(gb, 2); 142 si->vlc_set = get_bits(gb, 2);
141 skip_bits1(gb); 143 skip_bits1(gb);
142 si->pts = get_bits(gb, 13); 144 si->pts = get_bits(gb, 13);
143 if(!si->type || !get_bits1(gb)) 145 if(!si->type || !get_bits1(gb))
144 rv40_parse_picture_size(gb, &w, &h); 146 rv40_parse_picture_size(gb, &w, &h);
145 if(avcodec_check_dimensions(r->s.avctx, w, h) < 0) 147 if(av_check_image_size(w, h, 0, r->s.avctx) < 0)
146 return -1; 148 return -1;
147 si->width = w; 149 si->width = w;
148 si->height = h; 150 si->height = h;
149 mb_size = ((w + 15) >> 4) * ((h + 15) >> 4); 151 mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
150 mb_bits = ff_rv34_get_start_offset(gb, mb_size); 152 mb_bits = ff_rv34_get_start_offset(gb, mb_size);