[FFmpeg-devel] [PATCH] Fix warning in libavformat/utils.c

Martin Storsjö martin
Mon Jun 28 10:04:57 CEST 2010


On Sun, 27 Jun 2010, M?ns Rullg?rd wrote:

> Eli Friedman <eli.friedman at gmail.com> writes:
> 
> > Patch attached; st->cur_pkt.destruct and st->cur_pkt.data have
> > completely different types, so the assignment warns.
> >
> > -Eli
> >
> > Index: libavformat/utils.c
> > ===================================================================
> > --- libavformat/utils.c	(revision 23826)
> > +++ libavformat/utils.c	(working copy)
> > @@ -1077,7 +1077,7 @@
> >                      if(pkt->data == st->cur_pkt.data && pkt->size == st->cur_pkt.size){
> >                          s->cur_st = NULL;
> >                          pkt->destruct= st->cur_pkt.destruct;
> > -                        st->cur_pkt.destruct=
> > +                        st->cur_pkt.destruct= NULL;
> >                          st->cur_pkt.data    = NULL;
> >                          assert(st->cur_len == 0);
> >                      }else{
> 
> I'm OK with this.  Any remotely sane compiler will generate the same
> code anyhow, and it's arguably easier to read this way.

Applied.

// Martin



More information about the ffmpeg-devel mailing list