#ifndef WIN32
static int OpenNativeDll( decoder_t *, char *, char * );
#endif
+#if defined(LOADER) || defined(WIN32)
static int OpenWin32Dll( decoder_t *, char *, char * );
+#endif
static void CloseDll( decoder_t * );
static aout_buffer_t *Decode( decoder_t *, block_t ** );
void* extradata;
} wra_init_t;
+#if 0 /* I have no idea what this is doing here */
void *__builtin_new(unsigned long size) {return malloc(size);}
void __builtin_delete(void *p) {free(p);}
+#endif
static const int pi_channels_maps[7] =
{
int i, i_result;
/** Find the good path for the dlls.**/
- char *ppsz_path[] =
+ const char *ppsz_path[] =
{
".",
#ifndef WIN32
if( asprintf( &psz_dll, "%s/%4.4s.so.6.0", ppsz_path[i],
(char *)&p_dec->fmt_in.i_codec ) != -1 )
{
- i_result = OpenNativeDll( p_dec, ppsz_path[i], psz_dll );
+ i_result = OpenNativeDll( p_dec, (char *)ppsz_path[i], psz_dll );
free( psz_dll );
if( i_result == VLC_SUCCESS ) return VLC_SUCCESS;
}
if( asprintf( &psz_dll, "%s/%4.4s.so", ppsz_path[i],
(char *)&p_dec->fmt_in.i_codec ) != -1 )
{
- i_result = OpenNativeDll( p_dec, ppsz_path[i], psz_dll );
+ i_result = OpenNativeDll( p_dec, (char *)ppsz_path[i], psz_dll );
free( psz_dll );
if( i_result == VLC_SUCCESS ) return VLC_SUCCESS;
}
}
#endif /* Win32 */
+#if defined(LOADER) || defined(WIN32)
static int OpenWin32Dll( decoder_t *p_dec, char *psz_path, char *psz_dll )
{
-#if defined(LOADER) || defined(WIN32)
decoder_sys_t *p_sys = p_dec->p_sys;
void *handle = 0, *context = 0;
unsigned int i_result;
if( context ) p_sys->wraFreeDecoder( context );
if( context ) p_sys->wraCloseCodec( context );
FreeLibrary( handle );
-#endif
return VLC_EGENERIC;
}
+#endif
/*****************************************************************************
* CloseDll:
#endif
/* Date management */
- if( p_block->i_pts > 0 &&
+ if( p_block->i_pts > VLC_TS_INVALID &&
p_block->i_pts != date_Get( &p_sys->end_date ) )
{
date_Set( &p_sys->end_date, p_block->i_pts );
memcpy( p_aout_buffer->p_buffer, p_sys->p_out, p_sys->i_out );
/* Date management */
- p_aout_buffer->start_date = date_Get( &p_sys->end_date );
- p_aout_buffer->end_date =
- date_Increment( &p_sys->end_date, i_samples );
+ p_aout_buffer->i_pts = date_Get( &p_sys->end_date );
+ p_aout_buffer->i_length = date_Increment( &p_sys->end_date, i_samples )
+ - p_aout_buffer->i_pts;
}
block_Release( p_block );