use size_t instead of int to represent sizes
removes unused parameters from:
block_BytestreamInit()
mpeg4_audio/LOASSyncInfo()
cinepak/cinepak_Getv1()
speex/SendPacket()
subsass/ParseColor()
ffmpeg/postprocess/InitPostproc() & PostprocPict()
dvbsub/YuvaYuvp() & encode_pixel_line_{2,4,8}bp()
faad/DoReordering()
vlc_block_helper.h:
use size_t, removes unused parameter from block_BytestreamInit()
struct filter_t:
removes unused parameters from pf_picture_link() & pf_picture_unlink()
cmml: fix a segfault (p_item isn't an input item, despite the name) present for some months, proving that nobody did use that code ?
41 files changed:
{
block_t *p_chain;
block_t *p_block;
{
block_t *p_chain;
block_t *p_block;
-#define block_BytestreamInit( a ) __block_BytestreamInit( VLC_OBJECT(a) )
-
/*****************************************************************************
* block_bytestream_t management
*****************************************************************************/
/*****************************************************************************
* block_bytestream_t management
*****************************************************************************/
-static inline block_bytestream_t __block_BytestreamInit( vlc_object_t *p_obj )
+static inline block_bytestream_t block_BytestreamInit( void )
{
block_bytestream_t bytestream;
{
block_bytestream_t bytestream;
}
static inline int block_WaitBytes( block_bytestream_t *p_bytestream,
}
static inline int block_WaitBytes( block_bytestream_t *p_bytestream,
- int i_offset, i_copy, i_size;
+ size_t i_offset, i_copy, i_size;
/* Check we have that much data */
i_offset = p_bytestream->i_offset;
/* Check we have that much data */
i_offset = p_bytestream->i_offset;
}
static inline int block_SkipBytes( block_bytestream_t *p_bytestream,
}
static inline int block_SkipBytes( block_bytestream_t *p_bytestream,
+ size_t i_offset, i_copy;
/* Check we have that much data */
i_offset = p_bytestream->i_offset;
/* Check we have that much data */
i_offset = p_bytestream->i_offset;
}
static inline int block_PeekBytes( block_bytestream_t *p_bytestream,
}
static inline int block_PeekBytes( block_bytestream_t *p_bytestream,
- uint8_t *p_data, int i_data )
+ uint8_t *p_data, size_t i_data )
- int i_offset, i_copy, i_size;
+ size_t i_offset, i_copy, i_size;
/* Check we have that much data */
i_offset = p_bytestream->i_offset;
/* Check we have that much data */
i_offset = p_bytestream->i_offset;
}
static inline int block_GetBytes( block_bytestream_t *p_bytestream,
}
static inline int block_GetBytes( block_bytestream_t *p_bytestream,
- uint8_t *p_data, int i_data )
+ uint8_t *p_data, size_t i_data )
- int i_offset, i_copy, i_size;
+ size_t i_offset, i_copy, i_size;
/* Check we have that much data */
i_offset = p_bytestream->i_offset;
/* Check we have that much data */
i_offset = p_bytestream->i_offset;
}
static inline int block_PeekOffsetBytes( block_bytestream_t *p_bytestream,
}
static inline int block_PeekOffsetBytes( block_bytestream_t *p_bytestream,
- int i_peek_offset, uint8_t *p_data, int i_data )
+ size_t i_peek_offset, uint8_t *p_data, size_t i_data )
- int i_offset, i_copy, i_size;
+ size_t i_offset, i_copy, i_size;
/* Check we have that much data */
i_offset = p_bytestream->i_offset;
/* Check we have that much data */
i_offset = p_bytestream->i_offset;
}
static inline int block_FindStartcodeFromOffset(
}
static inline int block_FindStartcodeFromOffset(
- block_bytestream_t *p_bytestream, int *pi_offset,
+ block_bytestream_t *p_bytestream, size_t *pi_offset,
uint8_t *p_startcode, int i_startcode_length )
{
block_t *p_block, *p_block_backup = 0;
uint8_t *p_startcode, int i_startcode_length )
{
block_t *p_block, *p_block_backup = 0;
- int i_size, i_offset, i_offset_backup = 0;
+ int i_size = 0;
+ size_t i_offset, i_offset_backup = 0;
int i_caller_offset_backup = 0, i_match;
/* Find the right place */
int i_caller_offset_backup = 0, i_match;
/* Find the right place */
/* Begin the search.
* We first look for an occurrence of the 1st startcode byte and
* if found, we do a more thorough check. */
/* Begin the search.
* We first look for an occurrence of the 1st startcode byte and
* if found, we do a more thorough check. */
- i_size = p_block->i_buffer + i_size;
+ i_size += p_block->i_buffer;
*pi_offset -= i_size;
i_match = 0;
for( ; p_block != NULL; p_block = p_block->p_next )
*pi_offset -= i_size;
i_match = 0;
for( ; p_block != NULL; p_block = p_block->p_next )
/* Video output callbacks */
picture_t * ( * pf_vout_buffer_new) ( filter_t * );
void ( * pf_vout_buffer_del) ( filter_t *, picture_t * );
/* Video output callbacks */
picture_t * ( * pf_vout_buffer_new) ( filter_t * );
void ( * pf_vout_buffer_del) ( filter_t *, picture_t * );
- void ( * pf_picture_link) ( filter_t *, picture_t * );
- void ( * pf_picture_unlink) ( filter_t *, picture_t * );
+ void ( * pf_picture_link) ( picture_t * );
+ void ( * pf_picture_unlink) ( picture_t * );
/* SPU output callbacks */
subpicture_t * ( * pf_sub_buffer_new) ( filter_t * );
/* SPU output callbacks */
subpicture_t * ( * pf_sub_buffer_new) ( filter_t * );
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
- p_sys->bytestream = block_BytestreamInit( p_dec );
+ p_sys->bytestream = block_BytestreamInit();
p_sys->i_input_rate = INPUT_RATE_DEFAULT;
/* Set output properties */
p_sys->i_input_rate = INPUT_RATE_DEFAULT;
/* Set output properties */
{
enum adpcm_codec_e codec;
{
enum adpcm_codec_e codec;
- int i_block;
- int i_samplesperblock;
+ size_t i_block;
+ size_t i_samplesperblock;
audio_date_t end_date;
};
audio_date_t end_date;
};
{
decoder_sys_t *p_sys = p_dec->p_sys;
adpcm_ima_wav_channel_t channel[2];
{
decoder_sys_t *p_sys = p_dec->p_sys;
adpcm_ima_wav_channel_t channel[2];
int b_stereo;
b_stereo = p_dec->fmt_in.audio.i_channels == 2 ? 1 : 0;
int b_stereo;
b_stereo = p_dec->fmt_in.audio.i_channels == 2 ? 1 : 0;
*****************************************************************************/
static void EncoderClose ( vlc_object_t *p_this )
{
*****************************************************************************/
static void EncoderClose ( vlc_object_t *p_this )
{
}
/*****************************************************************************
}
/*****************************************************************************
static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
{
static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
{
- decoder_sys_t *p_sys = p_dec->p_sys;
-
if( pp_block && *pp_block )
{
Push( p_dec, *pp_block );
if( pp_block && *pp_block )
{
Push( p_dec, *pp_block );
}
static inline void cc_Exit( cc_data_t *c )
{
}
static inline void cc_Exit( cc_data_t *c )
{
return;
}
static inline void cc_Flush( cc_data_t *c )
return;
}
static inline void cc_Flush( cc_data_t *c )
* cdg.c: CDG decoder module
*****************************************************************************
* Copyright (C) 2007 Laurent Aimar
* cdg.c: CDG decoder module
*****************************************************************************
* Copyright (C) 2007 Laurent Aimar
*
* Authors: Laurent Aimar <fenrir # via.ecp.fr>
*
*
* Authors: Laurent Aimar <fenrir # via.ecp.fr>
*
static int DecodeMemoryPreset( decoder_sys_t *p_cdg, const uint8_t *p_data )
{
const int i_color = p_data[0]&0x0f;
static int DecodeMemoryPreset( decoder_sys_t *p_cdg, const uint8_t *p_data )
{
const int i_color = p_data[0]&0x0f;
const int i_repeat= p_data[1]&0x0f;
const int i_repeat= p_data[1]&0x0f;
/* if i_repeat > 0 we could ignore it if we have a reliable stream */
ScreenFill( p_cdg, 0, 0, CDG_SCREEN_WIDTH, CDG_SCREEN_HEIGHT, i_color );
return 0;
/* if i_repeat > 0 we could ignore it if we have a reliable stream */
ScreenFill( p_cdg, 0, 0, CDG_SCREEN_WIDTH, CDG_SCREEN_HEIGHT, i_color );
return 0;
static void cinepak_Getv4( cinepak_context_t *p_context,
int i_strip, int i_x, int i_y,
static void cinepak_Getv4( cinepak_context_t *p_context,
int i_strip, int i_x, int i_y,
- int i_x2, int i_y2, uint8_t *p_data )
{
uint8_t i_index[4];
int i,j;
{
uint8_t i_index[4];
int i,j;
static void cinepak_Getv1( cinepak_context_t *p_context,
int i_strip, int i_x, int i_y,
static void cinepak_Getv1( cinepak_context_t *p_context,
int i_strip, int i_x, int i_y,
- int i_x2, int i_y2, uint8_t *p_data )
{
uint8_t i_index;
int i,j;
{
uint8_t i_index;
int i,j;
i_strip,
i_strip_x1 + i_x,
i_strip_y1 + i_y,
i_strip,
i_strip_x1 + i_x,
i_strip_y1 + i_y,
- i_strip_x2, i_strip_y2,
p_data );
p_data += 4;
i_chunk_size -= 4;
p_data );
p_data += 4;
i_chunk_size -= 4;
i_strip,
i_strip_x1 + i_x,
i_strip_y1 + i_y,
i_strip,
i_strip_x1 + i_x,
i_strip_y1 + i_y,
- i_strip_x2, i_strip_y2,
p_data );
p_data++;
i_chunk_size--;
p_data );
p_data++;
i_chunk_size--;
i_strip,
i_strip_x1 + i_x,
i_strip_y1 + i_y,
i_strip,
i_strip_x1 + i_x,
i_strip_y1 + i_y,
- i_strip_x2, i_strip_y2,
p_data );
p_data += 4;
i_chunk_size -= 4;
p_data );
p_data += 4;
i_chunk_size -= 4;
i_strip,
i_strip_x1 + i_x,
i_strip_y1 + i_y,
i_strip,
i_strip_x1 + i_x,
i_strip_y1 + i_y,
- i_strip_x2, i_strip_y2,
p_data );
p_data++;
i_chunk_size--;
p_data );
p_data++;
i_chunk_size--;
i_strip,
i_strip_x1 + i_x,
i_strip_y1 + i_y,
i_strip,
i_strip_x1 + i_x,
i_strip_y1 + i_y,
- i_strip_x2, i_strip_y2,
p_data );
p_data++;
i_chunk_size--;
p_data );
p_data++;
i_chunk_size--;
fprintf( stderr, "HISTORY: [%d] NULL\n", i );
else
{
fprintf( stderr, "HISTORY: [%d] NULL\n", i );
else
{
- char *psz_uri = input_item_GetURI( p_item );
fprintf( stderr, "HISTORY: [%d] %p (%p->%s)\n", i, p_item,
fprintf( stderr, "HISTORY: [%d] %p (%p->%s)\n", i, p_item,
- psz_uri, psz_uri );
- free( psz_uri );
+ p_item->psz_uri, p_item->psz_uri );
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
+
+int E_(OpenIntf) ( vlc_object_t * );
+void E_(CloseIntf) ( vlc_object_t * );
+
static int InitThread ( intf_thread_t * );
static int MouseEvent ( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int InitThread ( intf_thread_t * );
static int MouseEvent ( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
+ VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+ VLC_UNUSED(oldval); VLC_UNUSED(newval);
+ VLC_UNUSED(p_data);
/* TODO: handle mouse clicks on the anchor text */
return VLC_SUCCESS;
/* TODO: handle mouse clicks on the anchor text */
return VLC_SUCCESS;
static int KeyEvent( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
static int KeyEvent( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
+ VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+ VLC_UNUSED(oldval); VLC_UNUSED(newval);
intf_thread_t *p_intf = (intf_thread_t *)p_data;
vlc_mutex_lock( &p_intf->change_lock );
intf_thread_t *p_intf = (intf_thread_t *)p_data;
vlc_mutex_lock( &p_intf->change_lock );
return psz_return_value;
#else
return psz_return_value;
#else
void *p;
/* Suppress warning messages about unused functions */
void *p;
/* Suppress warning messages about unused functions */
int GoBackCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
int GoBackCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
+ VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+ VLC_UNUSED(oldval); VLC_UNUSED(newval);
intf_thread_t *p_intf = (intf_thread_t *) p_data;
GoBack( p_intf );
return VLC_SUCCESS;
intf_thread_t *p_intf = (intf_thread_t *) p_data;
GoBack( p_intf );
return VLC_SUCCESS;
int GoForwardCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
int GoForwardCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
+ VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+ VLC_UNUSED(oldval); VLC_UNUSED(newval);
intf_thread_t *p_intf = (intf_thread_t *) p_data;
GoForward( p_intf );
return VLC_SUCCESS;
intf_thread_t *p_intf = (intf_thread_t *) p_data;
GoForward( p_intf );
return VLC_SUCCESS;
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
+ VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+ VLC_UNUSED(oldval); VLC_UNUSED(newval);
intf_thread_t *p_intf = (intf_thread_t *) p_data;
FollowAnchor( p_intf );
return VLC_SUCCESS;
intf_thread_t *p_intf = (intf_thread_t *) p_data;
FollowAnchor( p_intf );
return VLC_SUCCESS;
#include <string.h>
#include "xarray.h"
#include <string.h>
#include "xarray.h"
+/* local prototypes */
+XSTATIC XArray * xarray_New (unsigned int);
+
+
#define XARRAY_ASSERT_NOT_NULL(xarray) \
{ \
if (xarray == NULL) return XARRAY_ENULLPOINTER; \
#define XARRAY_ASSERT_NOT_NULL(xarray) \
{ \
if (xarray == NULL) return XARRAY_ENULLPOINTER; \
#define XARRAY_BOUNDS_CHECK(xarray, index) \
{ \
#define XARRAY_BOUNDS_CHECK(xarray, index) \
{ \
- if (index < 0) \
- return XARRAY_ENEGATIVEINDEX; \
- else if (xarray->last_valid_element != -1 && \
+ if (xarray->last_valid_element != -1 && \
(int) index > xarray->last_valid_element) \
return XARRAY_EINDEXTOOLARGE; \
}
(int) index > xarray->last_valid_element) \
return XARRAY_EINDEXTOOLARGE; \
}
new_xarray = (XArray *) malloc (sizeof(XArray));
if (new_xarray == NULL) return NULL;
new_xarray = (XArray *) malloc (sizeof(XArray));
if (new_xarray == NULL) return NULL;
- if (initial_size_hint <= 0)
+ if (initial_size_hint == 0)
initial_size = XARRAY_DEFAULT_SIZE;
else
initial_size = initial_size_hint;
initial_size = XARRAY_DEFAULT_SIZE;
else
initial_size = initial_size_hint;
+XTag * xtag_free (XTag * xtag);
+XTag * xtag_new_parse (const char * s, int n);
+char * xtag_get_name (XTag * xtag);
+char * xtag_get_pcdata (XTag * xtag);
+char * xtag_get_attribute (XTag * xtag, char * attribute);
+XTag * xtag_first_child (XTag * xtag, char * name);
+XTag * xtag_next_child (XTag * xtag, char * name);
+int xtag_snprint (char * buf, int n, XTag * xtag);
+
/* Character classes */
#define X_NONE 0
#define X_WHITESPACE 1<<0
/* Character classes */
#define X_NONE 0
#define X_WHITESPACE 1<<0
#define xurl_strdup strdup
#endif
#define xurl_strdup strdup
#endif
+char *XURL_FindQuery ( char *psz_url );
static char *XURL_FindHostname ( char *psz_url );
static char *XURL_FindPath ( char *psz_url );
static char *XURL_FindFragment ( char *psz_url );
static char *XURL_FindHostname ( char *psz_url );
static char *XURL_FindPath ( char *psz_url );
static char *XURL_FindFragment ( char *psz_url );
return pc_return_value;
}
return pc_return_value;
}
char *XURL_FindQuery( char *psz_url )
{
char *pc_question_mark = NULL;
char *XURL_FindQuery( char *psz_url )
{
char *pc_question_mark = NULL;
block_t *p_spu; /* Bytes of the packet. */
block_t *p_spu; /* Bytes of the packet. */
- int i_spu_size; /* goal for subtitle_data_pos while gathering,
+ size_t i_spu_size; /* goal for subtitle_data_pos while gathering,
size of used subtitle_data later */
uint16_t i_image_offset; /* offset from subtitle_data to compressed
image data */
size of used subtitle_data later */
uint16_t i_image_offset; /* offset from subtitle_data to compressed
image data */
- int i_image_length; /* size of the compressed image data */
- int first_field_offset; /* offset of even raster lines */
- int second_field_offset; /* offset of odd raster lines */
- int metadata_offset; /* offset to data describing the image */
- int metadata_length; /* length of metadata */
+ size_t i_image_length; /* size of the compressed image data */
+ size_t first_field_offset; /* offset of even raster lines */
+ size_t second_field_offset; /* offset of odd raster lines */
+ size_t metadata_offset; /* offset to data describing the image */
+ size_t metadata_length; /* length of metadata */
mtime_t i_duration; /* how long to display the image, 0 stands
for "until next subtitle" */
mtime_t i_duration; /* how long to display the image, 0 stands
for "until next subtitle" */
CMediaBuffer *p_mb = (CMediaBuffer *)This;
if( !ppBuffer && !pcbLength ) return E_POINTER;
CMediaBuffer *p_mb = (CMediaBuffer *)This;
if( !ppBuffer && !pcbLength ) return E_POINTER;
- if( ppBuffer ) *ppBuffer = p_mb->p_block->p_buffer;
+ if( ppBuffer ) *ppBuffer = (char*)p_mb->p_block->p_buffer;
if( pcbLength ) *pcbLength = p_mb->p_block->i_buffer;
return S_OK;
}
if( pcbLength ) *pcbLength = p_mb->p_block->i_buffer;
return S_OK;
}
#ifdef LOADER
/* Not Needed */
#ifdef LOADER
/* Not Needed */
-long CoInitialize( void *pvReserved ) { return -1; }
+long CoInitialize( void *pvReserved ) { VLC_UNUSED(pvReserved); return -1; }
void CoUninitialize( void ) { }
/* A few prototypes */
void CoUninitialize( void ) { }
/* A few prototypes */
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
- p_sys->bytestream = block_BytestreamInit( p_dec );
+ p_sys->bytestream = block_BytestreamInit();
/* Set output properties */
p_dec->fmt_out.i_cat = AUDIO_ES;
/* Set output properties */
p_dec->fmt_out.i_cat = AUDIO_ES;
/* FIXME: this routine is a hack to convert VLC_FOURCC('Y','U','V','A')
* into VLC_FOURCC('Y','U','V','P')
*/
/* FIXME: this routine is a hack to convert VLC_FOURCC('Y','U','V','A')
* into VLC_FOURCC('Y','U','V','P')
*/
-static subpicture_t *YuvaYuvp( encoder_t *p_enc, subpicture_t *p_subpic )
+static subpicture_t *YuvaYuvp( subpicture_t *p_subpic )
{
subpicture_region_t *p_region = NULL;
{
subpicture_region_t *p_region = NULL;
p_region = p_subpic->p_region;
if( p_region->fmt.i_chroma == VLC_FOURCC('Y','U','V','A') )
{
p_region = p_subpic->p_region;
if( p_region->fmt.i_chroma == VLC_FOURCC('Y','U','V','A') )
{
- p_temp = YuvaYuvp( p_enc, p_subpic );
+ p_temp = YuvaYuvp( p_subpic );
if( !p_temp )
{
msg_Err( p_enc, "no picture in subpicture" );
if( !p_temp )
{
msg_Err( p_enc, "no picture in subpicture" );
-static void encode_pixel_line_2bp( encoder_t *p_enc, bs_t *s,
- subpicture_region_t *p_region,
+static void encode_pixel_line_2bp( bs_t *s, subpicture_region_t *p_region,
-static void encode_pixel_line_4bp( encoder_t *p_enc, bs_t *s,
- subpicture_region_t *p_region,
+static void encode_pixel_line_4bp( bs_t *s, subpicture_region_t *p_region,
-static void encode_pixel_line_8bp( encoder_t *p_enc, bs_t *s,
- subpicture_region_t *p_region,
+static void encode_pixel_line_8bp( bs_t *s, subpicture_region_t *p_region,
int i_line );
static void encode_pixel_data( encoder_t *p_enc, bs_t *s,
subpicture_region_t *p_region,
int i_line );
static void encode_pixel_data( encoder_t *p_enc, bs_t *s,
subpicture_region_t *p_region,
case 4:
bs_write( s, 8, 0x10 ); /* 2 bit/pixel code string */
case 4:
bs_write( s, 8, 0x10 ); /* 2 bit/pixel code string */
- encode_pixel_line_2bp( p_enc, s, p_region, i_line );
+ encode_pixel_line_2bp( s, p_region, i_line );
break;
case 16:
bs_write( s, 8, 0x11 ); /* 4 bit/pixel code string */
break;
case 16:
bs_write( s, 8, 0x11 ); /* 4 bit/pixel code string */
- encode_pixel_line_4bp( p_enc, s, p_region, i_line );
+ encode_pixel_line_4bp( s, p_region, i_line );
break;
case 256:
bs_write( s, 8, 0x12 ); /* 8 bit/pixel code string */
break;
case 256:
bs_write( s, 8, 0x12 ); /* 8 bit/pixel code string */
- encode_pixel_line_8bp( p_enc, s, p_region, i_line );
+ encode_pixel_line_8bp( s, p_region, i_line );
-static void encode_pixel_line_2bp( encoder_t *p_enc, bs_t *s,
- subpicture_region_t *p_region,
+static void encode_pixel_line_2bp( bs_t *s, subpicture_region_t *p_region,
int i_line )
{
unsigned int i, i_length = 0;
int i_line )
{
unsigned int i, i_length = 0;
-static void encode_pixel_line_4bp( encoder_t *p_enc, bs_t *s,
- subpicture_region_t *p_region,
+static void encode_pixel_line_4bp( bs_t *s, subpicture_region_t *p_region,
int i_line )
{
unsigned int i, i_length = 0;
int i_line )
{
unsigned int i, i_length = 0;
-static void encode_pixel_line_8bp( encoder_t *p_enc, bs_t *s,
- subpicture_region_t *p_region,
+static void encode_pixel_line_8bp( bs_t *s, subpicture_region_t *p_region,
int i_line )
{
unsigned int i, i_length = 0;
int i_line )
{
unsigned int i, i_length = 0;
* Local prototypes
****************************************************************************/
static aout_buffer_t *DecodeBlock( decoder_t *, block_t ** );
* Local prototypes
****************************************************************************/
static aout_buffer_t *DecodeBlock( decoder_t *, block_t ** );
-static void DoReordering( decoder_t *, uint32_t *, uint32_t *, int, int,
- uint32_t * );
+static void DoReordering( uint32_t *, uint32_t *, int, int, uint32_t * );
#define MAX_CHANNEL_POSITIONS 9
#define MAX_CHANNEL_POSITIONS 9
/* temporary buffer */
uint8_t *p_buffer;
int i_buffer;
/* temporary buffer */
uint8_t *p_buffer;
int i_buffer;
/* Channel positions of the current stream (for re-ordering) */
uint32_t pi_channel_positions[MAX_CHANNEL_POSITIONS];
/* Channel positions of the current stream (for re-ordering) */
uint32_t pi_channel_positions[MAX_CHANNEL_POSITIONS];
p_out->end_date = aout_DateIncrement( &p_sys->date,
(frame.samples / frame.channels) * p_sys->i_input_rate / INPUT_RATE_DEFAULT );
p_out->end_date = aout_DateIncrement( &p_sys->date,
(frame.samples / frame.channels) * p_sys->i_input_rate / INPUT_RATE_DEFAULT );
- DoReordering( p_dec, (uint32_t *)p_out->p_buffer, samples,
+ DoReordering( (uint32_t *)p_out->p_buffer, samples,
frame.samples / frame.channels, frame.channels,
p_sys->pi_channel_positions );
frame.samples / frame.channels, frame.channels,
p_sys->pi_channel_positions );
* DoReordering: do some channel re-ordering (the ac3 channel order is
* different from the aac one).
*****************************************************************************/
* DoReordering: do some channel re-ordering (the ac3 channel order is
* different from the aac one).
*****************************************************************************/
-static void DoReordering( decoder_t *p_dec,
- uint32_t *p_out, uint32_t *p_in, int i_samples,
+static void DoReordering( uint32_t *p_out, uint32_t *p_in, int i_samples,
int i_nb_channels, uint32_t *pi_chan_positions )
{
int pi_chan_table[MAX_CHANNEL_POSITIONS];
int i_nb_channels, uint32_t *pi_chan_positions )
{
int pi_chan_table[MAX_CHANNEL_POSITIONS];
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
+ VLC_UNUSED(p_this); VLC_UNUSED(oldval);
decoder_t *p_dec = (decoder_t *)p_data;
if( !strcmp( psz_var, "fake-file" ) )
decoder_t *p_dec = (decoder_t *)p_data;
if( !strcmp( psz_var, "fake-file" ) )
block_Release( p_block );
return NULL;
}
block_Release( p_block );
return NULL;
}
- else if( i_used > p_block->i_buffer )
+ else if( (size_t)i_used > p_block->i_buffer )
{
i_used = p_block->i_buffer;
}
{
i_used = p_block->i_buffer;
}
static void video_del_buffer_filter( filter_t *p_filter, picture_t *p_pic )
{
static void video_del_buffer_filter( filter_t *p_filter, picture_t *p_pic )
{
- (void)p_filter;
- if( p_pic && p_pic->p_data_orig ) free( p_pic->p_data_orig );
- if( p_pic ) free( p_pic );
+ VLC_UNUSED(p_filter);
+ if( p_pic )
+ {
+ free( p_pic->p_data_orig );
+ free( p_pic );
+ }
}
/*****************************************************************************
}
/*****************************************************************************
static const uint16_t mpa_freq_tab[6] =
{ 44100, 48000, 32000, 22050, 24000, 16000 };
static const uint16_t mpa_freq_tab[6] =
{ 44100, 48000, 32000, 22050, 24000, 16000 };
-static const int16_t mpeg4_default_intra_matrix[64] = {
+static const uint16_t mpeg4_default_intra_matrix[64] = {
8, 17, 18, 19, 21, 23, 25, 27,
17, 18, 19, 21, 23, 25, 27, 28,
20, 21, 22, 23, 24, 26, 28, 30,
8, 17, 18, 19, 21, 23, 25, 27,
17, 18, 19, 21, 23, 25, 27, 28,
20, 21, 22, 23, 24, 26, 28, 30,
27, 28, 30, 32, 35, 38, 41, 45,
};
27, 28, 30, 32, 35, 38, 41, 45,
};
-static const int16_t mpeg4_default_non_intra_matrix[64] = {
+static const uint16_t mpeg4_default_non_intra_matrix[64] = {
16, 17, 18, 19, 20, 21, 22, 23,
17, 18, 19, 20, 21, 22, 23, 24,
18, 19, 20, 21, 22, 23, 24, 25,
16, 17, 18, 19, 20, 21, 22, 23,
17, 18, 19, 20, 21, 22, 23, 24,
18, 19, 20, 21, 22, 23, 24, 25,
/* Postprocessing module */
void *E_(OpenPostproc)( decoder_t *, vlc_bool_t * );
/* Postprocessing module */
void *E_(OpenPostproc)( decoder_t *, vlc_bool_t * );
-int E_(InitPostproc)( decoder_t *, void *, int, int, int );
-int E_(PostprocPict)( decoder_t *, void *, picture_t *, struct AVFrame * );
+int E_(InitPostproc)( void *, int, int, int );
+int E_(PostprocPict)( void *, picture_t *, struct AVFrame * );
void E_(ClosePostproc)( decoder_t *, void * );
/*****************************************************************************
void E_(ClosePostproc)( decoder_t *, void * );
/*****************************************************************************
/*****************************************************************************
* InitPostproc:
*****************************************************************************/
/*****************************************************************************
* InitPostproc:
*****************************************************************************/
-int E_(InitPostproc)( decoder_t *p_dec, void *p_data,
- int i_width, int i_height, int pix_fmt )
+int E_(InitPostproc)( void *p_data, int i_width, int i_height, int pix_fmt )
{
video_postproc_sys_t *p_sys = (video_postproc_sys_t *)p_data;
unsigned i_cpu = vlc_CPU();
{
video_postproc_sys_t *p_sys = (video_postproc_sys_t *)p_data;
unsigned i_cpu = vlc_CPU();
/*****************************************************************************
* PostprocPict:
*****************************************************************************/
/*****************************************************************************
* PostprocPict:
*****************************************************************************/
-int E_(PostprocPict)( decoder_t *p_dec, void *p_data,
- picture_t *p_pic, AVFrame *p_ff_pic )
+int E_(PostprocPict)( void *p_data, picture_t *p_pic, AVFrame *p_ff_pic )
{
video_postproc_sys_t *p_sys = (video_postproc_sys_t *)p_data;
{
video_postproc_sys_t *p_sys = (video_postproc_sys_t *)p_data;
static int PPQCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
static int PPQCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
+ VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
decoder_t *p_dec = (decoder_t *)p_this;
video_postproc_sys_t *p_sys = (video_postproc_sys_t *)p_data;
decoder_t *p_dec = (decoder_t *)p_this;
video_postproc_sys_t *p_sys = (video_postproc_sys_t *)p_data;
if( p_sys->p_pp && p_sys->b_pp && !p_sys->b_pp_init )
{
if( p_sys->p_pp && p_sys->b_pp && !p_sys->b_pp_init )
{
- E_(InitPostproc)( p_dec, p_sys->p_pp, p_context->width,
+ E_(InitPostproc)( p_sys->p_pp, p_context->width,
p_context->height, p_context->pix_fmt );
p_sys->b_pp_init = VLC_TRUE;
}
p_context->height, p_context->pix_fmt );
p_sys->b_pp_init = VLC_TRUE;
}
int i_src_stride, i_dst_stride;
if( p_sys->p_pp && p_sys->b_pp )
int i_src_stride, i_dst_stride;
if( p_sys->p_pp && p_sys->b_pp )
- E_(PostprocPict)( p_dec, p_sys->p_pp, p_pic, p_ff_pic );
+ E_(PostprocPict)( p_sys->p_pp, p_pic, p_ff_pic );
else
{
for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ )
else
{
for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ )
p_sys->i_state = STATE_NOSYNC;
p_sys->b_stream_info = VLC_FALSE;
p_sys->p_block=NULL;
p_sys->i_state = STATE_NOSYNC;
p_sys->b_stream_info = VLC_FALSE;
p_sys->p_block=NULL;
- p_sys->bytestream = block_BytestreamInit( p_dec );
+ p_sys->bytestream = block_BytestreamInit();
#ifdef USE_LIBFLAC
/* Take care of flac init */
#ifdef USE_LIBFLAC
/* Take care of flac init */
DecoderReadCallback( const FLAC__StreamDecoder *decoder, FLAC__byte buffer[],
unsigned *bytes, void *client_data )
{
DecoderReadCallback( const FLAC__StreamDecoder *decoder, FLAC__byte buffer[],
unsigned *bytes, void *client_data )
{
decoder_t *p_dec = (decoder_t *)client_data;
decoder_sys_t *p_sys = p_dec->p_sys;
decoder_t *p_dec = (decoder_t *)client_data;
decoder_sys_t *p_sys = p_dec->p_sys;
const FLAC__Frame *frame,
const FLAC__int32 *const buffer[], void *client_data )
{
const FLAC__Frame *frame,
const FLAC__int32 *const buffer[], void *client_data )
{
decoder_t *p_dec = (decoder_t *)client_data;
decoder_sys_t *p_sys = p_dec->p_sys;
decoder_t *p_dec = (decoder_t *)client_data;
decoder_sys_t *p_sys = p_dec->p_sys;
const FLAC__StreamMetadata *metadata,
void *client_data )
{
const FLAC__StreamMetadata *metadata,
void *client_data )
{
decoder_t *p_dec = (decoder_t *)client_data;
decoder_sys_t *p_sys = p_dec->p_sys;
decoder_t *p_dec = (decoder_t *)client_data;
decoder_sys_t *p_sys = p_dec->p_sys;
FLAC__StreamDecoderErrorStatus status,
void *client_data )
{
FLAC__StreamDecoderErrorStatus status,
void *client_data )
{
decoder_t *p_dec = (decoder_t *)client_data;
switch( status )
decoder_t *p_dec = (decoder_t *)client_data;
switch( status )
const FLAC__StreamMetadata *metadata,
void *client_data )
{
const FLAC__StreamMetadata *metadata,
void *client_data )
{
encoder_t *p_enc = (encoder_t *)client_data;
msg_Err( p_enc, "MetadataCallback: %i", metadata->type );
encoder_t *p_enc = (encoder_t *)client_data;
msg_Err( p_enc, "MetadataCallback: %i", metadata->type );
unsigned bytes, unsigned samples,
unsigned current_frame, void *client_data )
{
unsigned bytes, unsigned samples,
unsigned current_frame, void *client_data )
{
+ VLC_UNUSED(encoder); VLC_UNUSED(current_frame);
encoder_t *p_enc = (encoder_t *)client_data;
encoder_sys_t *p_sys = p_enc->p_sys;
block_t *p_block;
encoder_t *p_enc = (encoder_t *)client_data;
encoder_sys_t *p_sys = p_enc->p_sys;
block_t *p_block;
p_sys->b_packetizer = VLC_FALSE;
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
p_sys->b_packetizer = VLC_FALSE;
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
- p_sys->bytestream = block_BytestreamInit( p_dec );
+ p_sys->bytestream = block_BytestreamInit();
p_sys->b_discontinuity = VLC_FALSE;
p_sys->i_input_rate = INPUT_RATE_DEFAULT;
p_sys->b_discontinuity = VLC_FALSE;
p_sys->i_input_rate = INPUT_RATE_DEFAULT;
static void user_read( png_structp p_png, png_bytep data, png_size_t i_length )
{
block_t *p_block = (block_t *)png_get_io_ptr( p_png );
static void user_read( png_structp p_png, png_bytep data, png_size_t i_length )
{
block_t *p_block = (block_t *)png_get_io_ptr( p_png );
- png_size_t i_read = __MIN( p_block->i_buffer, (int)i_length );
+ png_size_t i_read = __MIN( p_block->i_buffer, i_length );
memcpy( data, p_block->p_buffer, i_length );
p_block->p_buffer += i_length;
p_block->i_buffer -= i_length;
memcpy( data, p_block->p_buffer, i_length );
p_block->p_buffer += i_length;
p_block->i_buffer -= i_length;
uint8_t r, g, b;
for ( i = 0; i < p_surface->h; i++ )
{
uint8_t r, g, b;
for ( i = 0; i < p_surface->h; i++ )
{
- p_src = p_surface->pixels + i * p_surface->pitch;
+ p_src = (uint8_t*)p_surface->pixels + i * p_surface->pitch;
p_dst = p_pic->p[0].p_pixels + i * p_pic->p[0].i_pitch;
for ( j = 0; j < p_surface->w; j++ )
{
p_dst = p_pic->p[0].p_pixels + i * p_pic->p[0].i_pitch;
for ( j = 0; j < p_surface->w; j++ )
{
uint8_t r, g, b;
for ( i = 0; i < p_surface->h; i++ )
{
uint8_t r, g, b;
for ( i = 0; i < p_surface->h; i++ )
{
- p_src = p_surface->pixels + i * p_surface->pitch;
+ p_src = (uint8_t*)p_surface->pixels + i * p_surface->pitch;
p_dst = p_pic->p[0].p_pixels + i * p_pic->p[0].i_pitch;
for ( j = 0; j < p_surface->w; j++ )
{
p_dst = p_pic->p[0].p_pixels + i * p_pic->p[0].i_pitch;
for ( j = 0; j < p_surface->w; j++ )
{
uint8_t r, g, b, a;
for ( i = 0; i < p_surface->h; i++ )
{
uint8_t r, g, b, a;
for ( i = 0; i < p_surface->h; i++ )
{
- p_src = p_surface->pixels + i * p_surface->pitch;
+ p_src = (uint8_t*)p_surface->pixels + i * p_surface->pitch;
p_dst = p_pic->p[0].p_pixels + i * p_pic->p[0].i_pitch;
for ( j = 0; j < p_surface->w; j++ )
{
p_dst = p_pic->p[0].p_pixels + i * p_pic->p[0].i_pitch;
for ( j = 0; j < p_surface->w; j++ )
{
static void *ProcessPacket( decoder_t *, ogg_packet *, block_t ** );
static aout_buffer_t *DecodePacket( decoder_t *, ogg_packet * );
static void *ProcessPacket( decoder_t *, ogg_packet *, block_t ** );
static aout_buffer_t *DecodePacket( decoder_t *, ogg_packet * );
-static block_t *SendPacket( decoder_t *, ogg_packet *, block_t * );
+static block_t *SendPacket( decoder_t *, block_t * );
static void ParseSpeexComments( decoder_t *, ogg_packet * );
static void ParseSpeexComments( decoder_t *, ogg_packet * );
*/
speex_bits_rewind( &p_sys->bits );
speex_bits_write( &p_sys->bits,
*/
speex_bits_rewind( &p_sys->bits );
speex_bits_write( &p_sys->bits,
- p_new_block->p_buffer,
- i_bytes_in_speex_frame );
+ (char*)p_new_block->p_buffer,
+ (int)i_bytes_in_speex_frame );
/*
* Move the remaining part of the original packet (subsequent
/*
* Move the remaining part of the original packet (subsequent
*/
i_bytes_in_speex_frame--;
speex_bits_write( &p_sys->bits,
*/
i_bytes_in_speex_frame--;
speex_bits_write( &p_sys->bits,
- p_block->p_buffer,
- p_block->i_buffer - i_bytes_in_speex_frame );
- p_block = block_Realloc( p_block,
+ (char*)p_block->p_buffer,
+ p_block->i_buffer - i_bytes_in_speex_frame );
+ p_block = block_Realloc( p_block,
- p_block->i_buffer-i_bytes_in_speex_frame );
+ p_block->i_buffer-i_bytes_in_speex_frame );
*pp_block = p_block;
}
else
*pp_block = p_block;
}
else
}
free( p_frame_holder );
}
free( p_frame_holder );
- return SendPacket( p_dec, p_oggpacket /*Not used*/, p_new_block);
+ return SendPacket( p_dec, p_new_block);
- return SendPacket( p_dec, p_oggpacket, p_block );
+ return SendPacket( p_dec, p_block );
Decode the input and ensure that no errors
were encountered.
*/
Decode the input and ensure that no errors
were encountered.
*/
- i_decode_ret =
- speex_decode_int( p_sys->p_state,&p_sys->bits,p_aout_buffer->p_buffer );
+ i_decode_ret = speex_decode_int( p_sys->p_state, &p_sys->bits,
+ (spx_int16_t*)p_aout_buffer->p_buffer );
if ( i_decode_ret < 0 )
{
msg_Err( p_dec, "Decoding failed. Perhaps we have a bad stream?" );
if ( i_decode_ret < 0 )
{
msg_Err( p_dec, "Decoding failed. Perhaps we have a bad stream?" );
/*****************************************************************************
* SendPacket: send an ogg packet to the stream output.
*****************************************************************************/
/*****************************************************************************
* SendPacket: send an ogg packet to the stream output.
*****************************************************************************/
-static block_t *SendPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
- block_t *p_block )
+static block_t *SendPacket( decoder_t *p_dec, block_t *p_block )
{
decoder_sys_t *p_sys = p_dec->p_sys;
{
decoder_sys_t *p_sys = p_dec->p_sys;
* ParseColor: SSA stores color in BBGGRR, in ASS it uses AABBGGRR
* The string value in the string can be a pure integer, or hexadecimal &HBBGGRR
*****************************************************************************/
* ParseColor: SSA stores color in BBGGRR, in ASS it uses AABBGGRR
* The string value in the string can be a pure integer, or hexadecimal &HBBGGRR
*****************************************************************************/
-static void ParseColor( decoder_t *p_dec,
- char *psz_color,
- int *pi_color,
- int *pi_alpha )
+static void ParseColor( char *psz_color, int *pi_color, int *pi_alpha )
{
int i_color = 0;
if( !strncasecmp( psz_color, "&H", 2 ) )
{
int i_color = 0;
if( !strncasecmp( psz_color, "&H", 2 ) )
p_style->font_style.psz_fontname = strdup( psz_temp_fontname );
p_style->font_style.i_font_size = i_font_size;
p_style->font_style.psz_fontname = strdup( psz_temp_fontname );
p_style->font_style.i_font_size = i_font_size;
- ParseColor( p_dec, psz_temp_color1, &p_style->font_style.i_font_color, NULL );
- ParseColor( p_dec, psz_temp_color4, &p_style->font_style.i_shadow_color, NULL );
+ ParseColor( psz_temp_color1, &p_style->font_style.i_font_color, NULL );
+ ParseColor( psz_temp_color4, &p_style->font_style.i_shadow_color, NULL );
p_style->font_style.i_outline_color = p_style->font_style.i_shadow_color;
p_style->font_style.i_font_alpha = p_style->font_style.i_outline_alpha
= p_style->font_style.i_shadow_alpha = 0x00;
p_style->font_style.i_outline_color = p_style->font_style.i_shadow_color;
p_style->font_style.i_font_alpha = p_style->font_style.i_outline_alpha
= p_style->font_style.i_shadow_alpha = 0x00;
p_style->font_style.psz_fontname = strdup( psz_temp_fontname );
p_style->font_style.i_font_size = i_font_size;
msg_Dbg( p_dec, psz_temp_color1 );
p_style->font_style.psz_fontname = strdup( psz_temp_fontname );
p_style->font_style.i_font_size = i_font_size;
msg_Dbg( p_dec, psz_temp_color1 );
- ParseColor( p_dec, psz_temp_color1, &p_style->font_style.i_font_color,
+ ParseColor( psz_temp_color1, &p_style->font_style.i_font_color,
&p_style->font_style.i_font_alpha );
&p_style->font_style.i_font_alpha );
- ParseColor( p_dec, psz_temp_color3, &p_style->font_style.i_outline_color,
+ ParseColor( psz_temp_color3, &p_style->font_style.i_outline_color,
&p_style->font_style.i_outline_alpha );
&p_style->font_style.i_outline_alpha );
- ParseColor( p_dec, psz_temp_color4, &p_style->font_style.i_shadow_color,
+ ParseColor( psz_temp_color4, &p_style->font_style.i_shadow_color,
&p_style->font_style.i_shadow_alpha );
p_style->font_style.i_style_flags = 0;
&p_style->font_style.i_shadow_alpha );
p_style->font_style.i_style_flags = 0;
uint16_t i_image; /* image number in the subtitle stream */
uint8_t i_packet; /* packet number for above image number */
uint16_t i_image; /* image number in the subtitle stream */
uint8_t i_packet; /* packet number for above image number */
- int i_spu_size; /* goal for subtitle_data_pos while gathering,
+ size_t i_spu_size; /* goal for subtitle_data_pos while gathering,
size of used subtitle_data later */
uint16_t i_image_offset; /* offset from subtitle_data to compressed
image data */
size of used subtitle_data later */
uint16_t i_image_offset; /* offset from subtitle_data to compressed
image data */
- int i_image_length; /* size of the compressed image data */
- int second_field_offset; /* offset of odd raster lines */
- int metadata_offset; /* offset to data describing the image */
- int metadata_length; /* length of metadata */
+ size_t i_image_length; /* size of the compressed image data */
+ size_t second_field_offset; /* offset of odd raster lines */
+ size_t metadata_offset; /* offset to data describing the image */
+ size_t metadata_length; /* length of metadata */
mtime_t i_duration; /* how long to display the image, 0 stands
for "until next subtitle" */
mtime_t i_duration; /* how long to display the image, 0 stands
for "until next subtitle" */
p_enc->fmt_out.p_extra = realloc( p_enc->fmt_out.p_extra, p_enc->fmt_out.i_extra + i_size );
p_enc->fmt_out.p_extra = realloc( p_enc->fmt_out.p_extra, p_enc->fmt_out.i_extra + i_size );
- memcpy( p_enc->fmt_out.p_extra + p_enc->fmt_out.i_extra,
- p_sys->p_buffer, i_size );
+ memcpy( (uint8_t*)p_enc->fmt_out.p_extra + p_enc->fmt_out.i_extra,
+ p_sys->p_buffer, i_size );
p_enc->fmt_out.i_extra += i_size;
}
p_enc->fmt_out.i_extra += i_size;
}
block_bytestream_t bytestream;
int i_state;
block_bytestream_t bytestream;
int i_state;
uint8_t startcode[4];
vlc_bool_t b_slice;
uint8_t startcode[4];
vlc_bool_t b_slice;
p_sys->startcode[1] = 0;
p_sys->startcode[2] = 0;
p_sys->startcode[3] = 1;
p_sys->startcode[1] = 0;
p_sys->startcode[2] = 0;
p_sys->startcode[3] = 1;
- p_sys->bytestream = block_BytestreamInit( p_dec );
+ p_sys->bytestream = block_BytestreamInit();
p_sys->b_slice = VLC_FALSE;
p_sys->p_frame = NULL;
p_sys->b_sps = VLC_FALSE;
p_sys->b_slice = VLC_FALSE;
p_sys->p_frame = NULL;
p_sys->b_sps = VLC_FALSE;
/* Misc init */
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
/* Misc init */
p_sys->i_state = STATE_NOSYNC;
aout_DateSet( &p_sys->end_date, 0 );
- p_sys->bytestream = block_BytestreamInit( p_dec );
+ p_sys->bytestream = block_BytestreamInit();
p_sys->i_input_rate = INPUT_RATE_DEFAULT;
p_sys->b_latm_cfg = VLC_FALSE;
p_sys->i_input_rate = INPUT_RATE_DEFAULT;
p_sys->b_latm_cfg = VLC_FALSE;
/****************************************************************************
* LOAS helpers
****************************************************************************/
/****************************************************************************
* LOAS helpers
****************************************************************************/
-static int LOASSyncInfo( decoder_t *p_dec, uint8_t p_header[LOAS_HEADER_SIZE], unsigned int *pi_header_size )
+static int LOASSyncInfo( uint8_t p_header[LOAS_HEADER_SIZE], unsigned int *pi_header_size )
{
*pi_header_size = 3;
return ( ( p_header[1] & 0x1f ) << 8 ) + p_header[2];
{
*pi_header_size = 3;
return ( ( p_header[1] & 0x1f ) << 8 ) + p_header[2];
}
/* Check if frame is valid and get frame info */
}
/* Check if frame is valid and get frame info */
- p_sys->i_frame_size = LOASSyncInfo( p_dec, p_header, &p_sys->i_header_size );
+ p_sys->i_frame_size = LOASSyncInfo( p_header, &p_sys->i_header_size );
}
if( p_sys->i_frame_size <= 0 )
}
if( p_sys->i_frame_size <= 0 )
*/
block_bytestream_t bytestream;
int i_state;
*/
block_bytestream_t bytestream;
int i_state;
uint8_t p_startcode[3];
/*
uint8_t p_startcode[3];
/*
/* Misc init */
p_sys->i_state = STATE_NOSYNC;
/* Misc init */
p_sys->i_state = STATE_NOSYNC;
- p_sys->bytestream = block_BytestreamInit( p_dec );
+ p_sys->bytestream = block_BytestreamInit();
p_sys->p_startcode[0] = 0;
p_sys->p_startcode[1] = 0;
p_sys->p_startcode[2] = 1;
p_sys->p_startcode[0] = 0;
p_sys->p_startcode[1] = 0;
p_sys->p_startcode[2] = 1;
if( p_frag->p_buffer[3] >= 0x20 && p_frag->p_buffer[3] <= 0x2f )
{
/* Copy the complete VOL */
if( p_frag->p_buffer[3] >= 0x20 && p_frag->p_buffer[3] <= 0x2f )
{
/* Copy the complete VOL */
- if( p_dec->fmt_out.i_extra != p_frag->i_buffer )
+ if( (size_t)p_dec->fmt_out.i_extra != p_frag->i_buffer )
{
p_dec->fmt_out.p_extra =
realloc( p_dec->fmt_out.p_extra, p_frag->i_buffer );
{
p_dec->fmt_out.p_extra =
realloc( p_dec->fmt_out.p_extra, p_frag->i_buffer );
*/
block_bytestream_t bytestream;
int i_state;
*/
block_bytestream_t bytestream;
int i_state;
uint8_t p_startcode[3];
/* Sequence header and extension */
uint8_t p_startcode[3];
/* Sequence header and extension */
/* Misc init */
p_sys->i_state = STATE_NOSYNC;
/* Misc init */
p_sys->i_state = STATE_NOSYNC;
- p_sys->bytestream = block_BytestreamInit( p_dec );
+ p_sys->bytestream = block_BytestreamInit();
p_sys->p_startcode[0] = 0;
p_sys->p_startcode[1] = 0;
p_sys->p_startcode[2] = 1;
p_sys->p_startcode[0] = 0;
p_sys->p_startcode[1] = 0;
p_sys->p_startcode[2] = 1;
*/
block_bytestream_t bytestream;
int i_state;
*/
block_bytestream_t bytestream;
int i_state;
uint8_t p_startcode[3];
/* Current sequence header */
uint8_t p_startcode[3];
/* Current sequence header */
p_dec->p_sys = p_sys = malloc( sizeof( decoder_sys_t ) );
p_sys->i_state = STATE_NOSYNC;
p_dec->p_sys = p_sys = malloc( sizeof( decoder_sys_t ) );
p_sys->i_state = STATE_NOSYNC;
- p_sys->bytestream = block_BytestreamInit( p_dec );
+ p_sys->bytestream = block_BytestreamInit();
p_sys->p_startcode[0] = 0x00;
p_sys->p_startcode[1] = 0x00;
p_sys->p_startcode[2] = 0x01;
p_sys->p_startcode[0] = 0x00;
p_sys->p_startcode[1] = 0x00;
p_sys->p_startcode[2] = 0x01;
if( i_ridu > 4 && (ridu[0]&0x80) == 0 ) /* for advanced profile, the first bit is 1 */
{
video_format_t *p_v = &p_dec->fmt_in.video;
if( i_ridu > 4 && (ridu[0]&0x80) == 0 ) /* for advanced profile, the first bit is 1 */
{
video_format_t *p_v = &p_dec->fmt_in.video;
- const int i_potential_width = GetWBE( &ridu[0] );
- const int i_potential_height = GetWBE( &ridu[2] );
+ const size_t i_potential_width = GetWBE( &ridu[0] );
+ const size_t i_potential_height = GetWBE( &ridu[2] );
if( i_potential_width >= 2 && i_potential_width <= 8192 &&
i_potential_height >= 2 && i_potential_height <= 8192 )
if( i_potential_width >= 2 && i_potential_width <= 8192 &&
i_potential_height >= 2 && i_potential_height <= 8192 )
{64,33}, {160,99},{ 0, 0}, { 0, 0}
};
int i_ar = bs_read( &s, 4 );
{64,33}, {160,99},{ 0, 0}, { 0, 0}
};
int i_ar = bs_read( &s, 4 );
+ unsigned i_ar_w, i_ar_h;