diff mbox

[FFmpeg-devel] avfilter/vf_libvmaf: fix pre convert to framesync2 bugs

Message ID 1501738441-23838-1-git-send-email-ashk43712@gmail.com
State New
Headers show

Commit Message

Ashish Singh Aug. 3, 2017, 5:34 a.m. UTC
From: Ashish Singh <ashk43712@gmail.com>

Hi, it fixes the errors while converting to framesync2.
libvmaf was changed recently, double *score variable is removed in the new
version since it's not used anywhere. This patch fixes all the warnings and
segmentation faults.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
---
 libavfilter/vf_libvmaf.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Comments

Ronald S. Bultje Aug. 30, 2017, 1:24 p.m. UTC | #1
Hi,

On Thu, Aug 3, 2017 at 1:34 AM, Ashish Pratap Singh <ashk43712@gmail.com>
wrote:

> From: Ashish Singh <ashk43712@gmail.com>
>
> Hi, it fixes the errors while converting to framesync2.
> libvmaf was changed recently, double *score variable is removed in the new
> version since it's not used anywhere. This patch fixes all the warnings and
> segmentation faults.
>
> Signed-off-by: Ashish Singh <ashk43712@gmail.com>
> ---
>  libavfilter/vf_libvmaf.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)


Pushed.

Ronald
Derek Buitenhuis Aug. 30, 2017, 2:13 p.m. UTC | #2
On 8/30/2017 2:24 PM, Ronald S. Bultje wrote:
> Pushed.

Did libvmaf bump its version for this breaking change? (It should have...)

If so, bump the required version in configure, or other users will get
crashes.

- Derek
Ashish Singh Aug. 30, 2017, 2:46 p.m. UTC | #3
Hi,

On 30-08-2017 19:43, Derek Buitenhuis wrote:
> On 8/30/2017 2:24 PM, Ronald S. Bultje wrote:
>> Pushed.
> Did libvmaf bump its version for this breaking change? (It should have...)
>
> If so, bump the required version in configure, or other users will get
> crashes.
>
> - Derek
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
I didn't make a check for the libvmaf version in configure. I'll add 
that in the next patch. libvmaf is a new library and it's version is 
same as the old one (in the pkg-config). I'll inform vmaf developers to 
update the version after updating libvmaf in future to avoid crashes.
Thanks.
diff mbox

Patch

diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c
index 3345cad..f2a8c9a 100644
--- a/libavfilter/vf_libvmaf.c
+++ b/libavfilter/vf_libvmaf.c
@@ -24,7 +24,6 @@ 
  * Calculate the VMAF between two input videos.
  */
 
-#include <inttypes.h>
 #include <pthread.h>
 #include <libvmaf.h>
 #include "libavutil/avstring.h"
@@ -84,11 +83,10 @@  static const AVOption libvmaf_options[] = {
 AVFILTER_DEFINE_CLASS(libvmaf);
 
 #define read_frame_fn(type, bits)                                               \
-    static int read_frame_##bits##bit(float *ref_data, float *main_data,            \
-                                      float *temp_data, int stride,             \
-                                      double *score, void *ctx)                 \
+    static int read_frame_##bits##bit(float *ref_data, float *main_data,        \
+                                      float *temp_data, int stride, void *ctx)  \
 {                                                                               \
-    LIBVMAFContext *s = (LIBVMAFContext *) ctx;                                       \
+    LIBVMAFContext *s = (LIBVMAFContext *) ctx;                                 \
     int ret;                                                                    \
     \
     pthread_mutex_lock(&s->lock);                                               \
@@ -150,7 +148,7 @@  read_frame_fn(uint16_t, 10);
 static void compute_vmaf_score(LIBVMAFContext *s)
 {
     int (*read_frame)(float *ref_data, float *main_data, float *temp_data,
-                      int stride, double *score, void *ctx);
+                      int stride, void *ctx);
 
     if (s->desc->comp[0].depth <= 8) {
         read_frame = read_frame_8bit;