On Tue, Jul 14, 2020 at 2:57 AM Michael Niedermayer <mich...@niedermayer.cc> wrote: > > On Mon, Jul 13, 2020 at 10:50:02PM +0530, gautamr...@gmail.com wrote: > > From: Gautam Ramakrishnan <gautamr...@gmail.com> > > > > This patch adds support for PPM marker for JPEG2000 > > decoder. It allows the samples p1_03.j2k and p1_05.j2k > > to be decoded. > > --- > > libavcodec/jpeg2000dec.c | 107 +++++++++++++++++++++++++++++++++++---- > > 1 file changed, 97 insertions(+), 10 deletions(-) > [...] > > > @@ -2189,8 +2266,18 @@ static int > > jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) > > // Packet length, tile-part header > > ret = get_plt(s, len); > > break; > > + case JPEG2000_PPM: > > + // Packed headers, main header > > + ret = get_ppm(s, len); > > + break; > > case JPEG2000_PPT: > > // Packed headers, tile-part header > > + if (s->has_ppm) { > > + av_log(s->avctx, AV_LOG_ERROR, > > + "Cannot have both PPT and PPM marker.\n"); > > + return AVERROR_INVALIDDATA; > > + } > > is a similar check needed before get_ppm() ? As the PPM marker is in the main headers, it has to come before the PPT markers for sure. However, it strikes me that a check could be added to ensure that the PPM markers actually appear only in the main header and not in the tile part headers. > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > No human being will ever know the Truth, for even if they happen to say it > by chance, they would not even known they had done so. -- Xenophanes > _______________________________________________ > 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".
-- ------------- Gautam | _______________________________________________ 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".