comparison flashsvenc.c @ 4827:b3ee9a1526b0 libavcodec

Get rid of unnecessary pointer casts. patch by Nicholas Tung, ntung ntung com
author diego
date Sun, 08 Apr 2007 20:24:16 +0000
parents ff9749708137
children f99e40a7155b
comparison
equal deleted inserted replaced
4826:9ca9a53a848b 4827:b3ee9a1526b0
98 return 0; 98 return 0;
99 } 99 }
100 100
101 static int flashsv_encode_init(AVCodecContext *avctx) 101 static int flashsv_encode_init(AVCodecContext *avctx)
102 { 102 {
103 FlashSVContext *s = (FlashSVContext *)avctx->priv_data; 103 FlashSVContext *s = avctx->priv_data;
104 104
105 s->avctx = avctx; 105 s->avctx = avctx;
106 106
107 if ((avctx->width > 4095) || (avctx->height > 4095)) { 107 if ((avctx->width > 4095) || (avctx->height > 4095)) {
108 av_log(avctx, AV_LOG_ERROR, "Input dimensions too large, input must be max 4096x4096 !\n"); 108 av_log(avctx, AV_LOG_ERROR, "Input dimensions too large, input must be max 4096x4096 !\n");
230 } 230 }
231 231
232 232
233 static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data) 233 static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data)
234 { 234 {
235 FlashSVContext * const s = (FlashSVContext *)avctx->priv_data; 235 FlashSVContext * const s = avctx->priv_data;
236 AVFrame *pict = data; 236 AVFrame *pict = data;
237 AVFrame * const p = &s->frame; 237 AVFrame * const p = &s->frame;
238 int res; 238 int res;
239 int I_frame = 0; 239 int I_frame = 0;
240 int opt_w, opt_h; 240 int opt_w, opt_h;
320 return res; 320 return res;
321 } 321 }
322 322
323 static int flashsv_encode_end(AVCodecContext *avctx) 323 static int flashsv_encode_end(AVCodecContext *avctx)
324 { 324 {
325 FlashSVContext *s = (FlashSVContext *)avctx->priv_data; 325 FlashSVContext *s = avctx->priv_data;
326 326
327 deflateEnd(&(s->zstream)); 327 deflateEnd(&(s->zstream));
328 328
329 av_free(s->encbuffer); 329 av_free(s->encbuffer);
330 av_free(s->previous_frame); 330 av_free(s->previous_frame);