[FFmpeg-devel] [PATCH v2 2/3] avfilter/vf_mix: Check sscanf() return value

Limin Wang lance.lmwang at gmail.com
Sun Mar 29 02:06:40 EET 2020


On Sun, Mar 29, 2020 at 12:31:40AM +0100, Nicolas George wrote:
> Limin Wang (12020-03-29):
> > If av_sscanf failed,  s->weights[i] is invalid data and can't be used
> > further.
> 
> I think you are mistaken: if av_sscanf() fails, s->weights[i] stays
> unchanged: it was 0, it's still 0.
> 
> > As the old code allow to use the last weights, so I use 
> > continue to avoid invalid access only.
> 
> It's not invalid, it's 0.
> 
> > Do you think it's better to
> > print out one warning message?
> 
> With this correction, I think this change is not necessary at all.

Yes, the result is same with my change. Anyway if the user option is typo, 
the result may be unexpected for user. 

> 
> Regards,
> 
> -- 
>   Nicolas George



> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


-- 
Thanks,
Limin Wang


More information about the ffmpeg-devel mailing list