comparison cscd.c @ 10397:d7ed9dcc78e3 libavcodec

Remove unnecessary calls to avcodec_check_dimensions, the check is already done at a higher level.
author reimar
date Tue, 13 Oct 2009 20:13:28 +0000
parents 266bf83f634d
children 8a4984c5cacc
comparison
equal deleted inserted replaced
10396:2bb3882075b6 10397:d7ed9dcc78e3
214 return buf_size; 214 return buf_size;
215 } 215 }
216 216
217 static av_cold int decode_init(AVCodecContext *avctx) { 217 static av_cold int decode_init(AVCodecContext *avctx) {
218 CamStudioContext *c = avctx->priv_data; 218 CamStudioContext *c = avctx->priv_data;
219 if (avcodec_check_dimensions(avctx, avctx->height, avctx->width) < 0) {
220 return 1;
221 }
222 switch (avctx->bits_per_coded_sample) { 219 switch (avctx->bits_per_coded_sample) {
223 case 16: avctx->pix_fmt = PIX_FMT_RGB555; break; 220 case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
224 case 24: avctx->pix_fmt = PIX_FMT_BGR24; break; 221 case 24: avctx->pix_fmt = PIX_FMT_BGR24; break;
225 case 32: avctx->pix_fmt = PIX_FMT_RGB32; break; 222 case 32: avctx->pix_fmt = PIX_FMT_RGB32; break;
226 default: 223 default: