[FFmpeg-cvslog] avfilter: add vmafmotion filter

Michael Niedermayer michael at niedermayer.cc
Fri Oct 6 02:52:39 EEST 2017


On Sat, Sep 30, 2017 at 03:51:41PM +0000, Ashish Singh wrote:
> ffmpeg | branch: master | Ashish Singh <ashk43712 at gmail.com> | Sat Sep 16 02:35:58 2017 +0530| [148c8e88c43cfbabd6aee9f01ef30942cee9d359] | committer: Ronald S. Bultje
> 
> avfilter: add vmafmotion filter
> 
> Signed-off-by: Ashish Singh <ashk43712 at gmail.com>
> Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=148c8e88c43cfbabd6aee9f01ef30942cee9d359
> ---
> 
>  Changelog                   |   1 +
>  doc/filters.texi            |  14 ++
>  libavfilter/Makefile        |   1 +
>  libavfilter/allfilters.c    |   1 +
>  libavfilter/vf_vmafmotion.c | 365 ++++++++++++++++++++++++++++++++++++++++++++
>  libavfilter/vmaf_motion.h   |  58 +++++++
>  6 files changed, 440 insertions(+)
[...]
> +static av_cold int init(AVFilterContext *ctx)
> +{
> +    VMAFMotionContext *s = ctx->priv;
> +
> +    if (s->stats_file_str) {
> +        if (!strcmp(s->stats_file_str, "-")) {

> +            s->stats_file = stdout;

Using stdout can interfere with the user application using the filter


> +        } else {

> +            s->stats_file = fopen(s->stats_file_str, "w");

Opening a filter parameter provided string for writing is a dangerous
way to output data. It allows one with access to the parameters to
overwrite any writable file

data should only be output in a safe way

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

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- 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-cvslog/attachments/20171006/207bd99b/attachment.sig>


More information about the ffmpeg-cvslog mailing list