avcodec/jpeg2000dec: print invalid cdx/y values

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-08-21 04:43:57 +02:00
parent 3dfc5f551f
commit e428632c1a

View File

@ -275,7 +275,7 @@ static int get_siz(Jpeg2000DecoderContext *s)
s->cdy[i] = bytestream2_get_byteu(&s->g);
if ( !s->cdx[i] || s->cdx[i] == 3 || s->cdx[i] > 4
|| !s->cdy[i] || s->cdy[i] == 3 || s->cdy[i] > 4) {
av_log(s->avctx, AV_LOG_ERROR, "Invalid sample seperation\n");
av_log(s->avctx, AV_LOG_ERROR, "Invalid sample seperation %d/%d\n", s->cdx[i], s->cdy[i]);
return AVERROR_INVALIDDATA;
}
log2_chroma_wh |= s->cdy[i] >> 1 << i * 4 | s->cdx[i] >> 1 << i * 4 + 2;