[FFmpeg-devel] [PATCHv2] avformat/webmdashenc: fix uninitialized variable

Michael Niedermayer michael at niedermayer.cc
Thu Aug 20 21:23:08 CEST 2015


On Thu, Aug 20, 2015 at 01:14:10PM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On Thu, Aug 20, 2015 at 11:18 AM, Ganesh Ajjanagadde <gajjanagadde at gmail.com
> > wrote:
> 
> > Fixes -Wsometimes-uninitialized from
> >
> > http://fate.ffmpeg.org/report.cgi?time=20150820031140&slot=arm64-darwin-clang-apple-5.1
> >
> > Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> > ---
> >  libavformat/webmdashenc.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c
> > index 76ea423..898e464 100644
> > --- a/libavformat/webmdashenc.c
> > +++ b/libavformat/webmdashenc.c
> > @@ -392,10 +392,10 @@ static int write_adaptation_set(AVFormatContext *s,
> > int as_index)
> >          if (w->is_live) {
> >              AVDictionaryEntry *filename =
> >                  av_dict_get(s->streams[as->streams[i]]->metadata,
> > FILENAME, NULL, 0);
> > -            if (!filename ||
> > -                (ret = parse_filename(filename->value,
> > &representation_id, NULL, NULL))) {
> > +            if (!filename)
> > +                return AVERROR(EINVAL);
> > +            if (ret = parse_filename(filename->value, &representation_id,
> > NULL, NULL))
> >                  return ret;
> > -            }
> >          } else {
> >              representation_id = av_asprintf("%d", w->representation_id++);
> >              if (!representation_id) return AVERROR(ENOMEM);
> > --
> > 2.5.0
> 
> 
> lgtm.

applied

thanks

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

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150820/86f2989e/attachment.sig>


More information about the ffmpeg-devel mailing list