Commit 15dc321e authored by Thomas Guillem's avatar 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
parent 39ed50a2
......@@ -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);
......
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment