[vlc-commits] video_filter:canvas: init the fmt_out directly from filter_chain_GetFmtOut()

Steve Lhomme git at videolan.org
Fri Jul 21 13:25:36 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Jul 17 09:15:15 2017 +0200| [e74666db3f69e49b08fff1ec722d2d06ae5d4525] | committer: Jean-Baptiste Kempf

video_filter:canvas: init the fmt_out directly from filter_chain_GetFmtOut()

avoid a structure copy and avoid shallow copies of es_format_t

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e74666db3f69e49b08fff1ec722d2d06ae5d4525
---

 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,



More information about the vlc-commits mailing list