[FFmpeg-devel] [PATCH] avcodec/jpeg2000dec: Zero code and quant style

Paul B Mahol onemda at gmail.com
Wed Oct 2 18:53:41 CEST 2013


On 8/31/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> This prevents future frames from using half initialized/inconsistent
> structures
> Fixes assertion failure
> Fixes Ticket2897
>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavcodec/jpeg2000dec.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
> index 3f22ead..6e8f0d6 100644
> --- a/libavcodec/jpeg2000dec.c
> +++ b/libavcodec/jpeg2000dec.c
> @@ -1369,6 +1369,8 @@ static void
> jpeg2000_dec_cleanup(Jpeg2000DecoderContext *s)
>          }
>      }
>      av_freep(&s->tile);
> +    memset(s->codsty, 0, sizeof(s->codsty));
> +    memset(s->qntsty, 0, sizeof(s->qntsty));
>      s->numXtiles = s->numYtiles = 0;
>  }

lgtm


More information about the ffmpeg-devel mailing list