[vlc-commits] lib/video: fix video filters not set when there is no vout
Thomas Guillem
git at videolan.org
Tue Mar 14 15:10:55 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 14 14:23:51 2017 +0100| [15dc321efb42792c649331a03b2e68efee5fac6c] | committer: Thomas Guillem
lib/video: fix video filters not set when there is no vout
Set the video filter variable to the media_player, the vout will inherit from
it.
Fix #17761
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=15dc321efb42792c649331a03b2e68efee5fac6c
---
lib/media_player.c | 4 ++++
lib/video.c | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/media_player.c b/lib/media_player.c
index 1ed1d84..4619ed2 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -650,6 +650,10 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "vbi-page", VLC_VAR_INTEGER);
var_SetInteger (mp, "vbi-page", 100);
+ var_Create (mp, "video-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
+ var_Create (mp, "sub-source", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
+ var_Create (mp, "sub-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
+
var_Create (mp, "marq-marquee", VLC_VAR_STRING);
var_Create (mp, "marq-color", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
var_Create (mp, "marq-opacity", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
diff --git a/lib/video.c b/lib/video.c
index 1b684c6..a5157fd 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -778,9 +778,11 @@ set_int( libvlc_media_player_t *p_mi, const char *restrict name,
case 0: /* the enabler */
{
vout_thread_t *vout = GetVout( p_mi, 0 );
+ vlc_object_t *p_parent = vout ? VLC_OBJECT( vout ) :
+ VLC_OBJECT( p_mi );
+ vout_EnableFilter( p_parent, opt->name, value );
if (vout != NULL)
{ /* Fill sub-source */
- vout_EnableFilter( VLC_OBJECT( vout ), opt->name, value );
var_TriggerCallback( vout, "sub-source" );
vlc_object_release( vout );
}
More information about the vlc-commits
mailing list