comparison nuv.c @ 5655:711922c1e9e7 libavcodec

10l, add check forgotten in last commit
author reimar
date Sun, 09 Sep 2007 08:52:53 +0000
parents 93a54fcfa2f4
children 3f7d66453c2e
comparison
equal deleted inserted replaced
5654:93a54fcfa2f4 5655:711922c1e9e7
156 buf_size = c->decomp_size; 156 buf_size = c->decomp_size;
157 } 157 }
158 if (c->codec_frameheader) { 158 if (c->codec_frameheader) {
159 get_quant_quality(c, buf[10]); 159 get_quant_quality(c, buf[10]);
160 rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); 160 rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq);
161 if (buf_size < 12) {
162 av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame\n");
163 return -1;
164 }
161 buf = &buf[12]; 165 buf = &buf[12];
162 buf_size -= 12; 166 buf_size -= 12;
163 } 167 }
164 168
165 c->pic.pict_type = FF_I_TYPE; 169 c->pic.pict_type = FF_I_TYPE;