[FFmpeg-cvslog] avfilter/vf_hysteresis: allow using framesync options

Paul B Mahol git at videolan.org
Sun Nov 12 13:04:13 EET 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Nov 12 11:48:52 2017 +0100| [5f1bb258aba5bac5bb38483ec208e6e17a885ff7] | committer: Paul B Mahol

avfilter/vf_hysteresis: allow using framesync options

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5f1bb258aba5bac5bb38483ec208e6e17a885ff7
---

 libavfilter/vf_hysteresis.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavfilter/vf_hysteresis.c b/libavfilter/vf_hysteresis.c
index edca40fa21..551b33f332 100644
--- a/libavfilter/vf_hysteresis.c
+++ b/libavfilter/vf_hysteresis.c
@@ -33,6 +33,7 @@
 
 typedef struct HysteresisContext {
     const AVClass *class;
+    FFFrameSync fs;
 
     int planes;
     int threshold;
@@ -40,7 +41,6 @@ typedef struct HysteresisContext {
     int width[4], height[4];
     int nb_planes;
     int depth;
-    FFFrameSync fs;
 
     uint8_t *map;
     uint32_t *xy;
@@ -58,8 +58,6 @@ static const AVOption hysteresis_options[] = {
     { NULL }
 };
 
-AVFILTER_DEFINE_CLASS(hysteresis);
-
 static int query_formats(AVFilterContext *ctx)
 {
     static const enum AVPixelFormat pix_fmts[] = {
@@ -350,6 +348,8 @@ static av_cold void uninit(AVFilterContext *ctx)
     av_freep(&s->xy);
 }
 
+FRAMESYNC_DEFINE_CLASS(hysteresis, HysteresisContext, fs);
+
 static const AVFilterPad hysteresis_inputs[] = {
     {
         .name         = "base",
@@ -375,6 +375,7 @@ static const AVFilterPad hysteresis_outputs[] = {
 AVFilter ff_vf_hysteresis = {
     .name          = "hysteresis",
     .description   = NULL_IF_CONFIG_SMALL("Grow first stream into second stream by connecting components."),
+    .preinit       = hysteresis_framesync_preinit,
     .priv_size     = sizeof(HysteresisContext),
     .uninit        = uninit,
     .query_formats = query_formats,



More information about the ffmpeg-cvslog mailing list