[FFmpeg-devel] [PATCH 3/3] avformat/aiffenc: Remove wrong and redundant check

Michael Niedermayer michael at niedermayer.cc
Thu Oct 3 22:05:27 EEST 2019


On Wed, Oct 02, 2019 at 09:09:28AM +0200, Matthieu Bouron wrote:
> On Wed, Oct 02, 2019 at 06:04:12AM +0200, Andreas Rheinhardt wrote:
> > The check "if (!pb->seekable & AVIO_SEEKABLE_NORMAL)" is wrong, because
> > ! has higher precendence than &. But it is also redundant, because this
> > part of the code is only ever reached when the AVIO_SEEKABLE_NORMAL flag
> > is set for pb. So simply remove the check.
> > 
> > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> > ---
> >  libavformat/aiffenc.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c
> > index 0b837cd264..d09c9afb95 100644
> > --- a/libavformat/aiffenc.c
> > +++ b/libavformat/aiffenc.c
> > @@ -49,9 +49,6 @@ static int put_id3v2_tags(AVFormatContext *s, AIFFOutputContext *aiff)
> >      AVIOContext *pb = s->pb;
> >      AVPacketList *pict_list = aiff->pict_list;
> >  
> > -    if (!pb->seekable & AVIO_SEEKABLE_NORMAL)
> > -        return 0;
> > -
> >      if (!s->metadata && !aiff->pict_list)
> >          return 0;
> >  
> > -- 
> > 2.21.0
> 
> LGTM.

will apply

thx

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

"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20191003/8fb26f88/attachment.sig>


More information about the ffmpeg-devel mailing list