[FFmpeg-devel] [PATCH] jpeg2000: use of lowres parameter from avcodec.h

Michael Niedermayer michaelni at gmx.at
Tue Apr 30 10:18:33 CEST 2013


On Tue, Apr 30, 2013 at 09:47:22AM +0200, Nicolas BERTRAND wrote:
> Le 30/04/2013 02:07, Michael Niedermayer a écrit :
> >>+    if (c->nreslevels < s->avctx->lowres)
> >>>          c->nreslevels2decode = 1;
> >Possibly independant of this patch but
> >doesnt this make the variables inconsistent (and crash) ?
> Yes,
> When the lowres > number_or_resolution levels it crash.
> I try to change lowres value buts change nothing (still crash)
> /* compute number of resolution levels to decode */
>     if (c->nreslevels <= s->avctx->lowres) {
>         c->nreslevels2decode = 1;
>         s->avctx->lowres = c->nreslevels - 1;
>         }
>     else
>         c->nreslevels2decode = c->nreslevels - s->avctx->lowres;

jpeg2000dec reads & uses lowres before this code a change here will
cause the fields to be inconsistent

Iam also not sure if changing lowres is in itself completely safe
though it works with both ffplay and ffmpeg.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130430/7268778e/attachment.asc>


More information about the ffmpeg-devel mailing list