[vlc-devel] commit: libvlc_video: More simplification. (Pierre d'Herbemont )

git version control git at videolan.org
Fri Jun 13 15:19:47 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Fri Jun 13 15:12:05 2008 +0200| [242309aa32c60673010d3fd620818310d268b5d2]

libvlc_video: More simplification.

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

 src/control/video.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/src/control/video.c b/src/control/video.c
index 33287d8..9b5ce37 100644
--- a/src/control/video.c
+++ b/src/control/video.c
@@ -526,19 +526,13 @@ void libvlc_toggle_teletext( libvlc_media_player_t *p_mi,
 {
     /* We only work on the first vout */
     vout_thread_t *p_vout = GetVout( p_mi, p_e );
-    vlc_value_t val; int i_ret;
+    bool opaque; int i_ret;
 
     /* GetVout will raise the exception for us */
-    if( !p_vout )
-        return;
-
-    i_ret = var_Get( p_vout, "vbi-opaque", &val );
-    if( i_ret )
-        libvlc_exception_raise( p_e,
-                        "Unexpected error while looking up teletext value" );
+    if( !p_vout ) return;
 
-    val.b_bool = !val.b_bool;
-    i_ret = var_Set( p_vout, "vbi-opaque", val );
+    opaque = var_GetBool( p_vout, "vbi-opaque" );
+    i_ret = var_SetBool( p_vout, "vbi-opaque", !opaque );
     if( i_ret )
         libvlc_exception_raise( p_e,
                         "Unexpected error while setting teletext value" );




More information about the vlc-devel mailing list