comparison vqavideo.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 7dd2a45249a9
children ffb3668ff7af
comparison
equal deleted inserted replaced
12371:5dffb531b1cc 12372:914f484bb476
66 #include <stdio.h> 66 #include <stdio.h>
67 #include <stdlib.h> 67 #include <stdlib.h>
68 #include <string.h> 68 #include <string.h>
69 69
70 #include "libavutil/intreadwrite.h" 70 #include "libavutil/intreadwrite.h"
71 #include "libavcore/imgutils.h"
71 #include "avcodec.h" 72 #include "avcodec.h"
72 73
73 #define PALETTE_COUNT 256 74 #define PALETTE_COUNT 256
74 #define VQA_HEADER_SIZE 0x2A 75 #define VQA_HEADER_SIZE 0x2A
75 #define CHUNK_PREAMBLE_SIZE 8 76 #define CHUNK_PREAMBLE_SIZE 8
145 /* load up the VQA parameters from the header */ 146 /* load up the VQA parameters from the header */
146 vqa_header = (unsigned char *)s->avctx->extradata; 147 vqa_header = (unsigned char *)s->avctx->extradata;
147 s->vqa_version = vqa_header[0]; 148 s->vqa_version = vqa_header[0];
148 s->width = AV_RL16(&vqa_header[6]); 149 s->width = AV_RL16(&vqa_header[6]);
149 s->height = AV_RL16(&vqa_header[8]); 150 s->height = AV_RL16(&vqa_header[8]);
150 if(avcodec_check_dimensions(avctx, s->width, s->height)){ 151 if(av_check_image_size(s->width, s->height, 0, avctx)){
151 s->width= s->height= 0; 152 s->width= s->height= 0;
152 return -1; 153 return -1;
153 } 154 }
154 s->vector_width = vqa_header[10]; 155 s->vector_width = vqa_header[10];
155 s->vector_height = vqa_header[11]; 156 s->vector_height = vqa_header[11];