On Sun, May 02, 2021 at 02:51:20PM -0300, James Almer wrote: > On 5/2/2021 10:59 AM, Michael Niedermayer wrote: > > This simply performs a 2nd pass if a LSE is encountered with GRAY8 > > > > Fixes: tickets/3933/128.jls > > > > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > > --- > > libavcodec/jpeglsdec.c | 6 ++++-- > > libavcodec/mjpegdec.c | 10 +++++++--- > > libavcodec/mjpegdec.h | 1 + > > 3 files changed, 12 insertions(+), 5 deletions(-) > > > > diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c > > index d79bbe1ee3..bd9224d97d 100644 > > --- a/libavcodec/jpeglsdec.c > > +++ b/libavcodec/jpeglsdec.c > > @@ -118,8 +118,10 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s) > > shift = 8 - s->avctx->bits_per_raw_sample; > > } > > - s->picture_ptr->format = > > - s->avctx->pix_fmt = AV_PIX_FMT_PAL8; > > + s->force_pal8 = 1; > > + if (!pal) > > + return 1; > > + > > for (i=s->palette_index; i<=maxtab; i++) { > > Can maxtab be < 255? The palette may need to be zeroed in that case, because > get_buffer2 does not require this from implementations. > avcodec_default_get_buffer2() does it when allocating buffers in the pool, > though, but not after fetching them, so reused buffers may be dirty. They > will also be dirty if memory_poisoning is enabled.
will clear the palette after obtaining the picture and will apply the patchset thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".