[vlc-devel] [PATCH 08/18] video_filter:canvas: init the fmt_out directly from filter_chain_GetFmtOut()

Steve Lhomme robux4 at videolabs.io
Mon Jul 17 16:33:14 CEST 2017


avoid a structure copy and avoid shallow copies of es_format_t
---
 modules/video_filter/canvas.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_filter/canvas.c b/modules/video_filter/canvas.c
index b3096d2ede..f47538ed16 100644
--- a/modules/video_filter/canvas.c
+++ b/modules/video_filter/canvas.c
@@ -349,8 +349,8 @@ static int Activate( vlc_object_t *p_this )
         }
     }
 
-    fmt = *filter_chain_GetFmtOut( p_sys->p_chain );
-    es_format_Copy( &p_filter->fmt_out, &fmt );
+    es_format_Copy( &p_filter->fmt_out,
+                    filter_chain_GetFmtOut( p_sys->p_chain ) );
 
     vlc_ureduce( &p_filter->fmt_out.video.i_sar_num,
         &p_filter->fmt_out.video.i_sar_den,
-- 
2.12.1



More information about the vlc-devel mailing list