[FFmpeg-devel] [PATCH] avfilter/vf_psnr & vf_ssim: abort filtering when shortest video ends
Paul B Mahol
onemda at gmail.com
Fri Jun 26 10:23:36 CEST 2015
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavfilter/vf_psnr.c | 2 ++
libavfilter/vf_ssim.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c
index 406be88..5639d16 100644
--- a/libavfilter/vf_psnr.c
+++ b/libavfilter/vf_psnr.c
@@ -212,6 +212,8 @@ static av_cold int init(AVFilterContext *ctx)
}
s->dinput.process = do_psnr;
+ s->dinput.shortest = 1;
+ s->dinput.repeatlast = 1;
return 0;
}
diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c
index 604fb44..23e8eef 100644
--- a/libavfilter/vf_ssim.c
+++ b/libavfilter/vf_ssim.c
@@ -238,7 +238,7 @@ static av_cold int init(AVFilterContext *ctx)
s->dinput.process = do_ssim;
s->dinput.shortest = 1;
- s->dinput.repeatlast = 0;
+ s->dinput.repeatlast = 1;
return 0;
}
--
1.7.11.2
More information about the ffmpeg-devel
mailing list