/* Create user specified video filters */
psz_chain = var_GetNonEmptyString( p_stream, CFG_PREFIX "vfilter" );
- printf("psz_chain: \e[33;1m%s\e[0m\n", psz_chain );
+ msg_Dbg( p_stream, "psz_chain: %s\n", psz_chain );
{
config_chain_t *p_cfg;
for( p_cfg = p_stream->p_cfg; p_cfg != NULL; p_cfg = p_cfg->p_next )
{
- printf(" - %s\n", p_cfg->psz_value );
+ msg_Dbg( p_stream, " - %s\n", p_cfg->psz_value );
}
}
p_sys->i_vfilters = 0;
vlc_object_destroy( *pp_vfilter );
p_sys->i_vfilters--;
}
- //if( psz_parser && *psz_parser ) psz_parser++;
- printf("\n\npsz_parser: %s\n\n", psz_parser );
}
free( psz_chain );
}
else
{
- p_new_pic = (picture_t*)malloc( sizeof(picture_t) );
/* TODO: chroma conversion if needed */
- vout_AllocatePicture( p_stream, p_new_pic, p_pic->format.i_chroma,
+
+ p_new_pic = (picture_t*)malloc( sizeof(picture_t) );
+ if( p_new_pic == NULL )
+ {
+ msg_Err( p_stream, "image conversion failed" );
+ continue;
+ }
+
+ if( vout_AllocatePicture(
+ p_stream, p_new_pic, p_pic->format.i_chroma,
p_pic->format.i_width, p_pic->format.i_height,
- p_sys->p_decoder->fmt_out.video.i_aspect );
+ p_sys->p_decoder->fmt_out.video.i_aspect )
+ != VLC_SUCCESS )
+ {
+ free( p_new_pic );
+ msg_Err( p_stream, "image allocation failed" );
+ continue;
+ }
+
+ p_new_pic->pf_release = (pf_release_t)free;
vout_CopyPicture( p_stream, p_new_pic, p_pic );
}