[FFmpeg-devel] [PATCH 1/2] avidec: fix "avidec.c:362: warning: st may be used uninitialized in this function"

Michael Niedermayer michaelni at gmx.at
Mon Jan 23 03:37:39 CET 2012


On Sun, Jan 22, 2012 at 09:13:23AM +0100, Reimar Döffinger wrote:
> 
> 
> On 20 Jan 2012, at 20:59, Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> > libavformat/avidec.c |    1 +
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> > index 76dda0f..1c650dc 100644
> > --- a/libavformat/avidec.c
> > +++ b/libavformat/avidec.c
> > @@ -699,6 +699,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
> >             }
> >             break;
> >         case MKTAG('s', 't', 'r', 'd'):
> > +            st = s->streams[stream_index];
> >             if (stream_index >= (unsigned)s->nb_streams || st->codec->extradata_size) {
> 
> Huh? Aren't you using stream_index now before validating it?!

The only use i see is after its validated, but i might be missing
something ?

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

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120123/28f31996/attachment.asc>


More information about the ffmpeg-devel mailing list