Skip to content
Snippets Groups Projects
Commit 250e0193 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

video_filter: scene: fix usage when config_GetUserDir returns NULL

The snapshot cannot be created so the filter cannot be used.
parent cfc1bc92
No related branches found
No related tags found
1 merge request!2468fix usage of NULL config_GetUserDir/config_GetSysPath results
Pipeline #258164 passed with stage
in 45 minutes and 15 seconds
...@@ -194,6 +194,16 @@ static int Create( filter_t *p_filter ) ...@@ -194,6 +194,16 @@ static int Create( filter_t *p_filter )
if( p_sys->psz_path == NULL ) if( p_sys->psz_path == NULL )
p_sys->psz_path = config_GetUserDir( VLC_PICTURES_DIR ); p_sys->psz_path = config_GetUserDir( VLC_PICTURES_DIR );
if (unlikely(p_sys->psz_path == NULL))
{
msg_Err( p_filter, "could not create snapshot: no directory" );
image_HandlerDelete( p_sys->p_image );
free( p_sys->psz_prefix );
free( p_sys->psz_format );
free( p_sys );
return VLC_EGENERIC;
}
static const struct vlc_filter_operations filter_ops = static const struct vlc_filter_operations filter_ops =
{ {
.filter_video = Filter, .close = Destroy, .filter_video = Filter, .close = Destroy,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment