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

Hendrik Leppkes h.leppkes at gmail.com
Thu May 19 14:28:40 CEST 2016


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.

- Hendrik


More information about the ffmpeg-devel mailing list