diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-08-27 21:28:38 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-08-27 22:12:50 +0200 |
commit | 2cd7a9ebe0e177b1f318ed4b0fa4240801fc9383 (patch) | |
tree | d91b735df17b8215123dccb2f75ccc1d561888bf | |
parent | dacd827b81e442a3fbed0628a951c8f15f3591e3 (diff) | |
download | ffmpeg-2cd7a9ebe0e177b1f318ed4b0fa4240801fc9383.tar.gz |
JPEG-LS: clip offset based on cur_scan to valid range.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
-rw-r--r-- | libavcodec/jpeglsdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c index 8ea2cb5bdb..5e98b64644 100644 --- a/libavcodec/jpeglsdec.c +++ b/libavcodec/jpeglsdec.c @@ -286,8 +286,8 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor // av_log(s->avctx, AV_LOG_DEBUG, "JPEG-LS params: %ix%i NEAR=%i MV=%i T(%i,%i,%i) RESET=%i, LIMIT=%i, qbpp=%i, RANGE=%i\n",s->width,s->height,state->near,state->maxval,state->T1,state->T2,state->T3,state->reset,state->limit,state->qbpp, state->range); // av_log(s->avctx, AV_LOG_DEBUG, "JPEG params: ILV=%i Pt=%i BPP=%i, scan = %i\n", ilv, point_transform, s->bits, s->cur_scan); if(ilv == 0) { /* separate planes */ - off = s->cur_scan - 1; stride = (s->nb_components > 1) ? 3 : 1; + off = av_clip(s->cur_scan - 1, 0, stride); width = s->width * stride; cur += off; for(i = 0; i < s->height; i++) { |