[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 18:16:33 CEST 2010
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul 2 05:43:25 2010 +0300| [7304724fe82a58920d536a2326122b55ed8e2a59] | committer: Rémi Denis-Courmont
Fix libvlc_video_set_crop_geometry() to accept custom values (untested)
(cherry picked from commit c6464e8ebf846fc279ee448a15f61175f289c05c)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=7304724fe82a58920d536a2326122b55ed8e2a59
---
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 da3bab9..62cf5e4 100644
--- a/src/control/video.c
+++ b/src/control/video.c
@@ -396,7 +396,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