[vlc-commits] Kate: remove dead and broken vlc_object_find() use

Rémi Denis-Courmont git at videolan.org
Tue Mar 29 17:25:12 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 29 13:47:55 2011 +0300| [20dc5fbca9234431b6e3dd6259a8c61259318cf4] | committer: Rémi Denis-Courmont

Kate: remove dead and broken vlc_object_find() use

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

 modules/codec/kate.c |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/modules/codec/kate.c b/modules/codec/kate.c
index 7f2d6f6..d5e7ca8 100644
--- a/modules/codec/kate.c
+++ b/modules/codec/kate.c
@@ -652,7 +652,6 @@ static void GetVideoSize( decoder_t *p_dec, int *w, int *h )
 {
     /* searching for vout to get its size is frowned upon, so we don't and
        use a default size if the original canvas size is not specified. */
-#if 1
     decoder_sys_t *p_sys = p_dec->p_sys;
     if( p_sys->ki.original_canvas_width > 0 && p_sys->ki.original_canvas_height > 0 )
     {
@@ -666,30 +665,6 @@ static void GetVideoSize( decoder_t *p_dec, int *w, int *h )
         /* nothing, leave defaults */
         msg_Dbg( p_dec, "original canvas size unknown");
     }
-#else
-    /* keep this just in case it might be allowed one day ;) */
-    vout_thread_t *p_vout;
-    p_vout = vlc_object_find( (vlc_object_t*)p_dec, VLC_OBJECT_VOUT, FIND_CHILD );
-    if( p_vout )
-    {
-        decoder_sys_t *p_sys = p_dec->p_sys;
-        if( p_sys->ki.original_canvas_width > 0 && p_sys->ki.original_canvas_height > 0 )
-        {
-            *w = p_sys->ki.original_canvas_width;
-            *h = p_sys->ki.original_canvas_height;
-        }
-        else
-        {
-            *w = p_vout->fmt_in.i_width;
-            *h = p_vout->fmt_in.i_height;
-        }
-        msg_Dbg( p_dec, "video: in %d %d, out %d %d, original canvas %zu %zu",
-                 p_vout->fmt_in.i_width, p_vout->fmt_in.i_height,
-                 p_vout->fmt_out.i_width, p_vout->fmt_out.i_height,
-                 p_sys->ki.original_canvas_width, p_sys->ki.original_canvas_height );
-        vlc_object_release( p_vout );
-    }
-#endif
 }
 
 static void CreateKateBitmap( picture_t *pic, const kate_bitmap *bitmap )



More information about the vlc-commits mailing list