[FFmpeg-devel] [PATCH 2/3] avcodec/jpeg2000dec: remove ST=3 case

Michael Niedermayer michael at niedermayer.cc
Tue May 14 00:48:28 EEST 2024


On Mon, May 13, 2024 at 10:35:44AM +0200, Tomas Härdin wrote:
> fre 2024-05-10 klockan 16:07 +0200 skrev Michael Niedermayer:
> > Fixes: CID1460979 Logically dead code
> > 
> > Sponsored-by: Sovereign Tech Fund
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libavcodec/jpeg2000dec.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
> > index 28bf6be2fef..135537b52fb 100644
> > --- a/libavcodec/jpeg2000dec.c
> > +++ b/libavcodec/jpeg2000dec.c
> > @@ -835,9 +835,6 @@ static int get_tlm(Jpeg2000DecoderContext *s, int
> > n)
> >          case 2:
> >              bytestream2_get_be16(&s->g);
> >              break;
> > -        case 3:
> > -            bytestream2_get_be32(&s->g);
> > -            break;
> 
> Double-checked T.800 table A.34 and indeed ST == 3 is invalid (which is
> also checked just above). So looks OK.

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240513/2b4504c1/attachment.sig>


More information about the ffmpeg-devel mailing list