[vlc-commits] canvas: only add croppadd if it's actually used

Ilkka Ollakka git at videolan.org
Sun Sep 21 13:33:18 CEST 2014


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Sep 21 11:36:45 2014 +0100| [cca2e797e015fc52884989d1b186cf29e6b75231] | committer: Ilkka Ollakka

canvas: only add croppadd if it's actually used

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

 modules/video_filter/canvas.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_filter/canvas.c b/modules/video_filter/canvas.c
index b81a187..fe5de3f 100644
--- a/modules/video_filter/canvas.c
+++ b/modules/video_filter/canvas.c
@@ -336,8 +336,9 @@ static int Activate( vlc_object_t *p_this )
     filter_chain_Reset( p_sys->p_chain, &p_filter->fmt_in, &fmt );
     /* Append scaling module */
     filter_chain_AppendFilter( p_sys->p_chain, NULL, NULL, NULL, NULL );
-    /* Append padding module */
-    filter_chain_AppendFromString( p_sys->p_chain, psz_croppadd );
+    /* Append croppadd module if we actually do cropping or padding instead of just scaling*/
+    if( i_padd > 0 )
+        filter_chain_AppendFromString( p_sys->p_chain, psz_croppadd );
 
     fmt = *filter_chain_GetFmtOut( p_sys->p_chain );
     es_format_Copy( &p_filter->fmt_out, &fmt );



More information about the vlc-commits mailing list