[vlc-commits] commit: Fix libvlc_video_set_crop_geometry() to accept custom values ( untested) ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Fri Jul 2 04:44:30 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul  2 05:43:25 2010 +0300| [c6464e8ebf846fc279ee448a15f61175f289c05c] | committer: Rémi Denis-Courmont 

Fix libvlc_video_set_crop_geometry() to accept custom values (untested)

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

 src/control/video.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/control/video.c b/src/control/video.c
index e0772dc..60a1cee 100644
--- a/src/control/video.c
+++ b/src/control/video.c
@@ -398,7 +398,14 @@ void libvlc_video_set_crop_geometry( libvlc_media_player_t *p_mi,
     for (size_t i = 0; i < n; i++)
     {
         vout_thread_t *p_vout = pp_vouts[i];
-
+        vlc_value_t val;
+
+        /* Make sure the geometry is in the choice list */
+        /* Earlier choices are removed to not grow a long list over time. */
+        /* FIXME: not atomic - lock? */
+        val.psz_string = (char *)psz_geometry;
+        var_Change (p_vout, "crop", VLC_VAR_CLEARCHOICES, NULL, NULL);
+        var_Change (p_vout, "crop", VLC_VAR_ADDCHOICE, &val, &val);
         var_SetString (p_vout, "crop", psz_geometry);
         vlc_object_release (p_vout);
     }



More information about the vlc-commits mailing list