[FFmpeg-devel] [PATCH] avcodec/bitstream_filter: Check return code of av_opt_set_from_string()

Michael Niedermayer michael at niedermayer.cc
Thu May 19 14:44:59 CEST 2016


On Thu, May 19, 2016 at 02:28:40PM +0200, Hendrik Leppkes wrote:
> On Thu, May 19, 2016 at 1:29 PM, Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> > Fixes CID1361965
> >
> > Iam not 100% sure this doesnt break some case, if it does please
> > tell me. Ill fix it
> >
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libavcodec/bitstream_filter.c |    2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/libavcodec/bitstream_filter.c b/libavcodec/bitstream_filter.c
> > index 02878e3..4459bbb 100644
> > --- a/libavcodec/bitstream_filter.c
> > +++ b/libavcodec/bitstream_filter.c
> > @@ -123,6 +123,8 @@ int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
> >                  shorthand[0] = opt->name;
> >
> >              ret = av_opt_set_from_string(priv->ctx->priv_data, bsfc->args, shorthand, "=", ":");
> > +            if (ret < 0)
> > +                return ret;
> >          }
> >
> 
> I don't think erroring out here is really needed, its not like broken
> options would result in fatal failures later on.

ok, dismissed the CID in coverity as "intentional" with reference to
this thread


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

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- 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/20160519/520ab88e/attachment.sig>


More information about the ffmpeg-devel mailing list