diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-20 04:42:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-20 14:26:34 +0200 |
commit | bb9f4f94ace54ba0f06a1d89c558697f11d6c69d (patch) | |
tree | df472a283fa44884881aadc5d0498476bd3e462d | |
parent | 5ba9ec824aa6d63fcec8f3c61e720ec8ee1b22ee (diff) | |
download | ffmpeg-streaming-bb9f4f94ace54ba0f06a1d89c558697f11d6c69d.zip ffmpeg-streaming-bb9f4f94ace54ba0f06a1d89c558697f11d6c69d.tar.gz |
avcodec/jpeg2000dec: Replace TPsot check by assert
The condition is impossible now.
the TPsot type is changed to unsigned int to prevent gcc from producing warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/jpeg2000dec.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 88f6825..8f38c1d 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -627,7 +627,7 @@ static int get_sot(Jpeg2000DecoderContext *s, int n) Jpeg2000TilePart *tp; uint16_t Isot; uint32_t Psot; - uint8_t TPsot; + unsigned TPsot; if (bytestream2_get_bytes_left(&s->g) < 8) return AVERROR_INVALIDDATA; @@ -652,10 +652,7 @@ static int get_sot(Jpeg2000DecoderContext *s, int n) return AVERROR_INVALIDDATA; } - if (TPsot >= FF_ARRAY_ELEMS(s->tile[Isot].tile_part)) { - avpriv_request_sample(s->avctx, "Support for %"PRIu8" components", TPsot); - return AVERROR_PATCHWELCOME; - } + av_assert0(TPsot < FF_ARRAY_ELEMS(s->tile[Isot].tile_part)); s->tile[Isot].tp_idx = TPsot; tp = s->tile[Isot].tile_part + TPsot; |