Commit 5fb60cf1 authored by Led's avatar Led

cosmetic fixes

parent e0d031b5
......@@ -288,10 +288,12 @@ configure_hw:
if (err < 0)
goto error;
#if 0
cmd = "snd_pcm_sw_params_set_xfer_align";
err = snd_pcm_sw_params_set_xfer_align(ad->pcmHandle, swparams, 1);
if (err < 0)
goto error;
#endif
cmd = "snd_pcm_sw_params";
err = snd_pcm_sw_params(ad->pcmHandle, swparams);
......
......@@ -280,7 +280,7 @@ static int32_t mp4ff_read_esds(mp4ff_t *f)
f->track[f->total_tracks - 1]->decoderConfig = malloc(f->track[f->total_tracks - 1]->decoderConfigLen);
if (f->track[f->total_tracks - 1]->decoderConfig)
{
mp4ff_read_data(f, f->track[f->total_tracks - 1]->decoderConfig, f->track[f->total_tracks - 1]->decoderConfigLen);
mp4ff_read_data(f, (int8_t*)f->track[f->total_tracks - 1]->decoderConfig, f->track[f->total_tracks - 1]->decoderConfigLen);
} else {
f->track[f->total_tracks - 1]->decoderConfigLen = 0;
}
......
......@@ -384,7 +384,7 @@ int32_t mp4ff_read_sample(mp4ff_t *f, const int32_t track, const int32_t sample,
mp4ff_set_sample_position(f, track, sample);
result = mp4ff_read_data(f, *audio_buffer, *bytes);
result = mp4ff_read_data(f, (int8_t*)*audio_buffer, *bytes);
if (!result)
{
......@@ -410,7 +410,7 @@ static int32_t mp4ff_read_sample_v2(mp4ff_t *f, const int track, const int sampl
int32_t size = mp4ff_audio_frame_size(f,track,sample);
if (size<=0) return 0;
mp4ff_set_sample_position(f, track, sample);
result = mp4ff_read_data(f,buffer,size);
result = mp4ff_read_data(f, (int8_t*)buffer, size);
#ifdef ITUNES_DRM
if (f->track[track]->p_drms != NULL)
......
......@@ -143,7 +143,7 @@ static unsigned membuffer_transfer_from_file(membuffer * buf,mp4ff_t * src,unsig
bufptr = membuffer_get_ptr(buf);
if (bufptr==0) return 0;
if ((unsigned)mp4ff_read_data(src,(char*)bufptr + oldsize,bytes)!=bytes)
if ((unsigned) mp4ff_read_data(src, (int8_t*)(bufptr + oldsize), bytes) != bytes)
{
membuffer_set_error(buf);
return 0;
......@@ -406,7 +406,7 @@ static uint32_t find_atom(mp4ff_t * f,uint64_t base,uint32_t size,const char * n
if (remaining < 8) break;
atom_size = mp4ff_read_int32(f);
if (atom_size > remaining || atom_size < 8) break;
mp4ff_read_data(f,atom_name,4);
mp4ff_read_data(f, (int8_t*)atom_name, 4);
if (!memcmp(atom_name,name,4))
{
......@@ -573,21 +573,21 @@ static uint32_t modify_moov(mp4ff_t * f,const mp4ff_metadata_t * data,void ** ou
p_out = (uint8_t*)*out_buffer;
mp4ff_set_position(f,total_base);
mp4ff_read_data(f,p_out,(uint32_t)(udta_offset - total_base )); p_out += (uint32_t)(udta_offset - total_base );
mp4ff_read_data(f, (int8_t*)p_out, (uint32_t)(udta_offset - total_base)); p_out += (uint32_t)(udta_offset - total_base );
*(uint32_t*)p_out = fix_byte_order_32(mp4ff_read_int32(f) + size_delta); p_out += 4;
mp4ff_read_data(f,p_out,4); p_out += 4;
mp4ff_read_data(f,p_out,(uint32_t)(meta_offset - udta_offset - 8)); p_out += (uint32_t)(meta_offset - udta_offset - 8);
mp4ff_read_data(f, (int8_t*)p_out, 4); p_out += 4;
mp4ff_read_data(f, (int8_t*)p_out, (uint32_t)(meta_offset - udta_offset - 8)); p_out += (uint32_t)(meta_offset - udta_offset - 8);
*(uint32_t*)p_out = fix_byte_order_32(mp4ff_read_int32(f) + size_delta); p_out += 4;
mp4ff_read_data(f,p_out,4); p_out += 4;
mp4ff_read_data(f,p_out,(uint32_t)(ilst_offset - meta_offset - 8)); p_out += (uint32_t)(ilst_offset - meta_offset - 8);
mp4ff_read_data(f, (int8_t*)p_out, 4); p_out += 4;
mp4ff_read_data(f, (int8_t*)p_out, (uint32_t)(ilst_offset - meta_offset - 8)); p_out += (uint32_t)(ilst_offset - meta_offset - 8);
*(uint32_t*)p_out = fix_byte_order_32(mp4ff_read_int32(f) + size_delta); p_out += 4;
mp4ff_read_data(f,p_out,4); p_out += 4;
mp4ff_read_data(f, (int8_t*)p_out, 4); p_out += 4;
memcpy(p_out,new_ilst_buffer,new_ilst_size);
p_out += new_ilst_size;
mp4ff_set_position(f,ilst_offset + ilst_size);
mp4ff_read_data(f,p_out,(uint32_t)(total_size - (ilst_offset - total_base) - ilst_size));
mp4ff_read_data(f, (int8_t*)p_out, (uint32_t)(total_size - (ilst_offset - total_base) - ilst_size));
free(new_ilst_buffer);
}
......@@ -622,18 +622,18 @@ static int32_t mp4ff_meta_update(mp4ff_callback_t *f,const mp4ff_metadata_t * da
/* rename old moov to free */
mp4ff_set_position(ff, ff->moov_offset + 4);
mp4ff_write_data(ff, free_data, 4);
mp4ff_write_data(ff, (int8_t*)free_data, 4);
mp4ff_set_position(ff, ff->file_size);
mp4ff_write_int32(ff,new_moov_size + 8);
mp4ff_write_data(ff,"moov",4);
mp4ff_write_data(ff, (int8_t*)"moov", 4);
mp4ff_write_data(ff, new_moov_data, new_moov_size);
}
else
{
mp4ff_set_position(ff, ff->moov_offset);
mp4ff_write_int32(ff,new_moov_size + 8);
mp4ff_write_data(ff,"moov",4);
mp4ff_write_data(ff, (int8_t*)"moov", 4);
mp4ff_write_data(ff, new_moov_data, new_moov_size);
}
......
......@@ -69,7 +69,7 @@ int32_t mp4ff_write_int32(mp4ff_t *f,const uint32_t data)
result = (a<<24) | (b<<16) | (c<<8) | d;
return mp4ff_write_data(f,(uint8_t*)&result,sizeof(result));
return mp4ff_write_data(f, (int8_t*)&result, sizeof(result));
}
int32_t mp4ff_set_position(mp4ff_t *f, const int64_t position)
......@@ -91,7 +91,7 @@ uint64_t mp4ff_read_int64(mp4ff_t *f)
uint64_t result = 0;
int8_t i;
mp4ff_read_data(f, data, 8);
mp4ff_read_data(f, (int8_t*)data, 8);
for (i = 0; i < 8; i++)
{
......@@ -151,7 +151,7 @@ char * mp4ff_read_string(mp4ff_t * f,uint32_t length)
char * str = (char*)malloc(length + 1);
if (str!=0)
{
if ((uint32_t)mp4ff_read_data(f,str,length)!=length)
if ((uint32_t) mp4ff_read_data(f, (int8_t*)str, length) != length)
{
free(str);
str = 0;
......@@ -167,7 +167,7 @@ char * mp4ff_read_string(mp4ff_t * f,uint32_t length)
uint8_t mp4ff_read_char(mp4ff_t *f)
{
uint8_t output;
mp4ff_read_data(f, &output, 1);
mp4ff_read_data(f, (int8_t*)&output, 1);
return output;
}
......
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