Commit e428632c authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dec: print invalid cdx/y values

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3dfc5f55
...@@ -275,7 +275,7 @@ static int get_siz(Jpeg2000DecoderContext *s) ...@@ -275,7 +275,7 @@ static int get_siz(Jpeg2000DecoderContext *s)
s->cdy[i] = bytestream2_get_byteu(&s->g); s->cdy[i] = bytestream2_get_byteu(&s->g);
if ( !s->cdx[i] || s->cdx[i] == 3 || s->cdx[i] > 4 if ( !s->cdx[i] || s->cdx[i] == 3 || s->cdx[i] > 4
|| !s->cdy[i] || s->cdy[i] == 3 || s->cdy[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; return AVERROR_INVALIDDATA;
} }
log2_chroma_wh |= s->cdy[i] >> 1 << i * 4 | s->cdx[i] >> 1 << i * 4 + 2; log2_chroma_wh |= s->cdy[i] >> 1 << i * 4 | s->cdx[i] >> 1 << i * 4 + 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment