Remove use of the deprecated function avcodec_check_dimensions(), use

av_check_image_size() instead.

Originally committed as revision 24711 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini
2010-08-06 09:37:04 +00:00
parent 899a507fa6
commit 6ce9b4310c
46 changed files with 92 additions and 54 deletions

View File

@ -25,6 +25,7 @@
* @author Michael Niedermayer <michaelni@gmx.at>
*/
#include "libavcore/imgutils.h"
#include "internal.h"
#include "dsputil.h"
#include "avcodec.h"
@ -341,7 +342,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
sps->mb_width = get_ue_golomb(&s->gb) + 1;
sps->mb_height= get_ue_golomb(&s->gb) + 1;
if((unsigned)sps->mb_width >= INT_MAX/16 || (unsigned)sps->mb_height >= INT_MAX/16 ||
avcodec_check_dimensions(NULL, 16*sps->mb_width, 16*sps->mb_height)){
av_check_image_size(16*sps->mb_width, 16*sps->mb_height, 0, h->s.avctx)){
av_log(h->s.avctx, AV_LOG_ERROR, "mb_width/height overflow\n");
goto fail;
}