Commit 4ae811b6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Motion: fix the vlc_object_find bug and flag the other bugs

parent de401510
......@@ -35,6 +35,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_interface.h>
#include <vlc_playlist.h>
#include <vlc_vout.h>
#ifdef HAVE_UNISTD_H
......@@ -189,11 +190,11 @@ static void RunIntf( intf_thread_t *p_intf )
for( ;; )
{
vout_thread_t *p_vout;
const char *psz_filter, *psz_type;
bool b_change = false;
/* Wait a bit, get orientation, change filter if necessary */
#warning FIXME: check once (or less) per picture, not once per interval
msleep( INTF_IDLE_SLEEP );
int canc = vlc_savecancel();
......@@ -243,14 +244,24 @@ static void RunIntf( intf_thread_t *p_intf )
if( b_change )
{
p_vout = (vout_thread_t *)
vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
if( p_vout )
#warning FIXME: refactor this plugin as a video filter!
input_thread_t *p_input;
p_input = playlist_CurrentInput( pl_Get( p_intf ) );
if( p_input )
{
config_PutPsz( p_vout, "transform-type", psz_type );
var_SetString( p_vout, "video-filter", psz_filter );
vlc_object_release( p_vout );
vout_thread_t *p_vout;
p_vout = input_GetVout( p_input );
if( p_vout )
{
#warning FIXME: do not override the permanent configuration!
#warning FIXME: transform-type does not exist anymore
config_PutPsz( p_vout, "transform-type", psz_type );
var_SetString( p_vout, "video-filter", psz_filter );
vlc_object_release( p_vout );
}
vlc_object_release( p_input );
i_oldx = i_x;
}
}
......
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