comparison eacmv.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
27 * Technical details here: 27 * Technical details here:
28 * http://wiki.multimedia.cx/index.php?title=Electronic_Arts_CMV 28 * http://wiki.multimedia.cx/index.php?title=Electronic_Arts_CMV
29 */ 29 */
30 30
31 #include "libavutil/intreadwrite.h" 31 #include "libavutil/intreadwrite.h"
32 #include "libavcore/imgutils.h"
32 #include "avcodec.h" 33 #include "avcodec.h"
33 34
34 typedef struct CmvContext { 35 typedef struct CmvContext {
35 AVCodecContext *avctx; 36 AVCodecContext *avctx;
36 AVFrame frame; ///< current 37 AVFrame frame; ///< current
154 if (AV_RL32(buf)==MVIh_TAG||AV_RB32(buf)==MVIh_TAG) { 155 if (AV_RL32(buf)==MVIh_TAG||AV_RB32(buf)==MVIh_TAG) {
155 cmv_process_header(s, buf+EA_PREAMBLE_SIZE, buf_end); 156 cmv_process_header(s, buf+EA_PREAMBLE_SIZE, buf_end);
156 return buf_size; 157 return buf_size;
157 } 158 }
158 159
159 if (avcodec_check_dimensions(s->avctx, s->width, s->height)) 160 if (av_check_image_size(s->width, s->height, 0, s->avctx))
160 return -1; 161 return -1;
161 162
162 /* shuffle */ 163 /* shuffle */
163 if (s->last2_frame.data[0]) 164 if (s->last2_frame.data[0])
164 avctx->release_buffer(avctx, &s->last2_frame); 165 avctx->release_buffer(avctx, &s->last2_frame);