# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <vlc_vout.h>
#include <vlc_codec.h>
static void CloseDecoder( vlc_object_t * );
vlc_module_begin();
- set_description( _("Cinepak video decoder") );
+ set_description( N_("Cinepak video decoder") );
set_capability( "decoder", 100 );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_VCODEC );
/* Allocate the memory needed to store the decoder's structure */
if( ( p_dec->p_sys = p_sys = malloc(sizeof(decoder_sys_t)) ) == NULL )
- {
- msg_Err( p_dec, "out of memory" );
- return VLC_EGENERIC;
- }
+ return VLC_ENOMEM;
memset( &p_sys->context, 0, sizeof( cinepak_context_t ) );
var_Create( p_dec, "grayscale", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
{
p_context->p_pix[i] = malloc( p_context->i_stride[i] *
p_context->i_lines[i] );
+ if( p_context->p_pix[i] == NULL )
+ return -1;
/* Set it to all black */
memset( p_context->p_pix[i], ( i == 0 ) ? 0 : 128 ,
p_context->i_stride[i] * p_context->i_lines[i] );