[FFmpeg-devel] [PATCH v3 1/2] lavfi/vf_scale: use default swscale flags for simple and complex filter graph

Linjie Fu linjie.justin.fu at gmail.com
Thu Aug 5 03:21:27 EEST 2021


On Thu, Aug 5, 2021 at 2:22 AM Nicolas George <george at nsup.org> wrote:

> Linjie Fu (12021-08-05):
> > > > -    if (scale->flags_str) {
> > > > +    if (*scale->flags_str) {
> > > It could still be NULL, IIRC.
> > sws_flags doesn't have a candidate for "" (NULL) [1].
> > Hence NULL input for flags leads to a parsing issue:
>
> It is not what I am talking about.
>
> The application can set scale->flags to NULL. If it does,
> *scale->flags_str crashes.
>

Got your point, change it locally into:

-    if (scale->flags_str) {
+   if (scale->flags_str && *scale->flags_str)  {

Thanks for the review. Plan to apply soon if no more comments.

- linjie


More information about the ffmpeg-devel mailing list