Commit f3f203e5 authored by Pierre Ynard's avatar Pierre Ynard

Fix const warnings

parent 349f2690
......@@ -115,7 +115,7 @@ static ssize_t vorbis_header (void **pextra, const uint8_t *buf, size_t len)
unsigned sizes[3] = {
idlen, cmtlen, setuplen
};
void *payloads[3] = {
const void *payloads[3] = {
buf + 0,
buf + idlen,
buf + cmtlen
......
......@@ -392,14 +392,14 @@ int OpenDemux( vlc_object_t *p_this )
if( cc->codec_id == CODEC_ID_THEORA && b_ogg )
{
unsigned pi_size[3];
void *pp_data[3];
const void *pp_data[3];
unsigned i_count;
for( i_count = 0; i_count < 3; i_count++ )
{
if( i_extra < 2 )
break;
pi_size[i_count] = GetWBE( p_extra );
pp_data[i_count] = (uint8_t*)&p_extra[2];
pp_data[i_count] = &p_extra[2];
if( i_extra < pi_size[i_count] + 2 )
break;
......@@ -415,15 +415,15 @@ int OpenDemux( vlc_object_t *p_this )
}
else if( cc->codec_id == CODEC_ID_SPEEX && b_ogg )
{
uint8_t p_dummy_comment[] = {
const uint8_t p_dummy_comment[] = {
0, 0, 0, 0,
0, 0, 0, 0,
};
unsigned pi_size[2];
void *pp_data[2];
const void *pp_data[2];
pi_size[0] = i_extra;
pp_data[0] = (uint8_t*)p_extra;
pp_data[0] = p_extra;
pi_size[1] = sizeof(p_dummy_comment);
pp_data[1] = p_dummy_comment;
......
......@@ -69,7 +69,7 @@ static inline int xiph_SplitHeaders(unsigned packet_size[], void *packet[], unsi
}
static inline int xiph_PackHeaders(int *extra_size, void **extra,
unsigned packet_size[], void *packet[], unsigned packet_count )
unsigned packet_size[], const void *packet[], unsigned packet_count )
{
if (packet_count <= 0 || packet_count > XIPH_MAX_HEADER_COUNT)
return VLC_EGENERIC;
......@@ -117,7 +117,7 @@ static inline int xiph_PackHeaders(int *extra_size, void **extra,
}
static inline int xiph_AppendHeaders(int *extra_size, void **extra,
unsigned size, const void *data)
unsigned size, void *data)
{
unsigned packet_size[XIPH_MAX_HEADER_COUNT];
void *packet[XIPH_MAX_HEADER_COUNT];
......@@ -134,8 +134,9 @@ static inline int xiph_AppendHeaders(int *extra_size, void **extra,
free(*extra);
packet_size[count] = size;
packet[count] = (void*)data;
if (xiph_PackHeaders(extra_size, extra, packet_size, packet, count + 1)) {
packet[count] = data;
if (xiph_PackHeaders(extra_size, extra, packet_size,
(const void **)packet, count + 1)) {
*extra_size = 0;
*extra = NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment