[vlc-devel] [PATCH 17/18] modules:video_filters: a filter must clean the es_format_t before overwriting it
Steve Lhomme
robux4 at videolabs.io
Mon Jul 17 16:33:23 CEST 2017
It may contain various dynamically allocated values.
---
modules/hw/mmal/deinterlace.c | 1 +
modules/video_filter/canvas.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/modules/hw/mmal/deinterlace.c b/modules/hw/mmal/deinterlace.c
index 4caf508d3a..864e55991f 100644
--- a/modules/hw/mmal/deinterlace.c
+++ b/modules/hw/mmal/deinterlace.c
@@ -149,6 +149,7 @@ static int Open(filter_t *filter)
sys->input->format->es->video.par.num = filter->fmt_in.video.i_sar_num;
sys->input->format->es->video.par.den = filter->fmt_in.video.i_sar_den;
+ es_format_Clean(&filter->fmt_out);
es_format_Copy(&filter->fmt_out, &filter->fmt_in);
filter->fmt_out.video.i_frame_rate *= 2;
diff --git a/modules/video_filter/canvas.c b/modules/video_filter/canvas.c
index f47538ed16..28b0946d35 100644
--- a/modules/video_filter/canvas.c
+++ b/modules/video_filter/canvas.c
@@ -349,6 +349,7 @@ static int Activate( vlc_object_t *p_this )
}
}
+ es_format_Clean( &p_filter->fmt_out );
es_format_Copy( &p_filter->fmt_out,
filter_chain_GetFmtOut( p_sys->p_chain ) );
--
2.12.1
More information about the vlc-devel
mailing list