forked from len0rd/rockbox
libm4a: Fix warnings introduced in 001a338e51
Change-Id: Ia915e6f8babbd71533f22af566e5c45c2b40fbe5
This commit is contained in:
parent
001a338e51
commit
ac82a653bb
3 changed files with 34 additions and 34 deletions
|
@ -28,7 +28,7 @@
|
|||
CODEC_HEADER
|
||||
|
||||
/* The maximum buffer size handled by faad. 12 bytes are required by libfaad
|
||||
* as headroom (see libfaad/bits.c). FAAD_BYTE_BUFFER_SIZE bytes are buffered
|
||||
* as headroom (see libfaad/bits.c). FAAD_BYTE_BUFFER_SIZE bytes are buffered
|
||||
* for each frame. */
|
||||
#define FAAD_BYTE_BUFFER_SIZE (2048-12)
|
||||
|
||||
|
@ -62,7 +62,7 @@ enum codec_status codec_run(void)
|
|||
int framelength;
|
||||
int lead_trim = 0;
|
||||
unsigned int frame_samples;
|
||||
unsigned int i;
|
||||
uint32_t i;
|
||||
unsigned char* buffer;
|
||||
NeAACDecFrameInfo frame_info;
|
||||
NeAACDecHandle decoder;
|
||||
|
@ -129,7 +129,7 @@ enum codec_status codec_run(void)
|
|||
#endif
|
||||
|
||||
i = 0;
|
||||
|
||||
|
||||
if (param) {
|
||||
elapsed_time = param;
|
||||
action = CODEC_ACTION_SEEK_TIME;
|
||||
|
@ -138,7 +138,7 @@ enum codec_status codec_run(void)
|
|||
* upsampling files the resulting sound_samples_done must be expanded
|
||||
* by a factor of 2. This is done via using sbr_fac. */
|
||||
if (m4a_seek_raw(&demux_res, &input_stream, file_offset,
|
||||
&sound_samples_done, (int*) &i, &seek_idx)) {
|
||||
&sound_samples_done, &i, &seek_idx)) {
|
||||
sound_samples_done *= sbr_fac;
|
||||
} else {
|
||||
sound_samples_done = 0;
|
||||
|
@ -151,8 +151,8 @@ enum codec_status codec_run(void)
|
|||
}
|
||||
|
||||
ci->set_elapsed(elapsed_time);
|
||||
|
||||
if (i == 0)
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
lead_trim = ci->id3->lead_trim;
|
||||
}
|
||||
|
@ -168,17 +168,17 @@ enum codec_status codec_run(void)
|
|||
/* Deal with any pending seek requests */
|
||||
if (action == CODEC_ACTION_SEEK_TIME) {
|
||||
/* Seek to the desired time position. Important: When seeking in SBR
|
||||
* upsampling files the seek_time must be divided by 2 when calling
|
||||
* m4a_seek and the resulting sound_samples_done must be expanded
|
||||
* upsampling files the seek_time must be divided by 2 when calling
|
||||
* m4a_seek and the resulting sound_samples_done must be expanded
|
||||
* by a factor 2. This is done via using sbr_fac. */
|
||||
if (m4a_seek(&demux_res, &input_stream,
|
||||
(uint64_t) param * ci->id3->frequency / sbr_fac / 1000ULL,
|
||||
&sound_samples_done, (int*) &i, &seek_idx)) {
|
||||
&sound_samples_done, &i, &seek_idx)) {
|
||||
sound_samples_done *= sbr_fac;
|
||||
elapsed_time = sound_samples_done * 1000LL / ci->id3->frequency;
|
||||
ci->set_elapsed(elapsed_time);
|
||||
|
||||
if (i == 0)
|
||||
if (i == 0)
|
||||
{
|
||||
lead_trim = ci->id3->lead_trim;
|
||||
}
|
||||
|
@ -190,9 +190,9 @@ enum codec_status codec_run(void)
|
|||
action = CODEC_ACTION_NULL;
|
||||
|
||||
/* There can be gaps between chunks, so skip ahead if needed. It
|
||||
* doesn't seem to happen much, but it probably means that a
|
||||
* doesn't seem to happen much, but it probably means that a
|
||||
* "proper" file can have chunks out of order. Why one would want
|
||||
* that an good question (but files with gaps do exist, so who
|
||||
* that an good question (but files with gaps do exist, so who
|
||||
* knows?), so we don't support that - for now, at least.
|
||||
*/
|
||||
file_offset = m4a_check_sample_offset(&demux_res, i, &seek_idx);
|
||||
|
@ -219,7 +219,7 @@ enum codec_status codec_run(void)
|
|||
|
||||
/* Output the audio */
|
||||
ci->yield();
|
||||
|
||||
|
||||
frame_samples = frame_info.samples >> 1;
|
||||
|
||||
if (empty_first_frame)
|
||||
|
@ -238,7 +238,7 @@ enum codec_status codec_run(void)
|
|||
|
||||
/* Gather number of samples for the decoded frame. */
|
||||
framelength = frame_samples - lead_trim;
|
||||
|
||||
|
||||
if (i == demux_res.num_sample_byte_sizes - 1)
|
||||
{
|
||||
// Size of the last frame
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue