mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 05:52:31 +02:00
Fix compiler warnings
This commit is contained in:
parent
da63ad53f2
commit
318c30373f
1 changed files with 1 additions and 44 deletions
|
@ -302,8 +302,6 @@ static inline void h_flushbits (huffdec_bitbuf * bb, guint N);
|
||||||
static inline guint32 h_getbits (huffdec_bitbuf * bb, guint N);
|
static inline guint32 h_getbits (huffdec_bitbuf * bb, guint N);
|
||||||
|
|
||||||
static void h_rewindNbits (huffdec_bitbuf * bb, guint N);
|
static void h_rewindNbits (huffdec_bitbuf * bb, guint N);
|
||||||
static inline void h_byte_align (huffdec_bitbuf * bb);
|
|
||||||
static inline guint h_bytes_avail (huffdec_bitbuf * bb);
|
|
||||||
|
|
||||||
/* Return the current bit stream position (in bits) */
|
/* Return the current bit stream position (in bits) */
|
||||||
#if ENABLE_OPT_BS
|
#if ENABLE_OPT_BS
|
||||||
|
@ -506,37 +504,6 @@ h_getbits (huffdec_bitbuf * bb, guint N)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If not on a byte boundary, skip remaining bits in this byte */
|
|
||||||
static inline void
|
|
||||||
h_byte_align (huffdec_bitbuf * bb)
|
|
||||||
{
|
|
||||||
#if ENABLE_OPT_BS
|
|
||||||
if ((bb->buf_bit_idx % 8) != 0) {
|
|
||||||
bb->buf_bit_idx -= (bb->buf_bit_idx % 8);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
/* If buf_bit_idx == 0 or == 8 then we're already byte aligned.
|
|
||||||
* Check by looking at the bottom bits of the byte */
|
|
||||||
if (bb->buf_byte_idx <= bb->avail && (bb->buf_bit_idx & 0x07) != 0) {
|
|
||||||
bb->buf_bit_idx = 8;
|
|
||||||
bb->buf_byte_idx++;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline guint
|
|
||||||
h_bytes_avail (huffdec_bitbuf * bb)
|
|
||||||
{
|
|
||||||
if (bb->avail >= bb->buf_byte_idx) {
|
|
||||||
if (bb->buf_bit_idx != 8)
|
|
||||||
return bb->avail - bb->buf_byte_idx - 1;
|
|
||||||
else
|
|
||||||
return bb->avail - bb->buf_byte_idx;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct mp3cimpl_info mp3cimpl_info;
|
typedef struct mp3cimpl_info mp3cimpl_info;
|
||||||
|
|
||||||
struct mp3cimpl_info
|
struct mp3cimpl_info
|
||||||
|
@ -5395,7 +5362,7 @@ out_fifo (short pcm_sample[2][SSLIMIT][SBLIMIT], int num,
|
||||||
static void
|
static void
|
||||||
init_syn_filter (frame_params * fr_ps)
|
init_syn_filter (frame_params * fr_ps)
|
||||||
{
|
{
|
||||||
register int i, k;
|
int i, k;
|
||||||
gfloat (*filter)[32];
|
gfloat (*filter)[32];
|
||||||
|
|
||||||
filter = fr_ps->filter;
|
filter = fr_ps->filter;
|
||||||
|
@ -7355,13 +7322,6 @@ c_decode_mp3 (mp3tl * tl)
|
||||||
/* And setup the huffman bitstream reader for this data */
|
/* And setup the huffman bitstream reader for this data */
|
||||||
h_setbuf (bb, tl->c_impl.hb_buf, tl->c_impl.main_data_end);
|
h_setbuf (bb, tl->c_impl.hb_buf, tl->c_impl.main_data_end);
|
||||||
|
|
||||||
#if 0
|
|
||||||
g_print ("Mode %d mode_ext %d\n", hdr->mode, hdr->mode_ext);
|
|
||||||
g_print ("Frame: main_data %d bytes. need %d prev bytes. Avail %d (of %d)\n",
|
|
||||||
hdr->main_slots, III_side_info.main_data_begin, h_bytes_avail (bb),
|
|
||||||
III_side_info.main_data_begin + hdr->main_slots);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Clear the scale factors to avoid problems with badly coded files
|
/* Clear the scale factors to avoid problems with badly coded files
|
||||||
* that try to reuse scalefactors from the first granule when they didn't
|
* that try to reuse scalefactors from the first granule when they didn't
|
||||||
* supply them. */
|
* supply them. */
|
||||||
|
@ -7489,9 +7449,6 @@ c_decode_mp3 (mp3tl * tl)
|
||||||
out_fifo (tl->pcm_sample, 18, &tl->fr_ps, tl->sample_buf,
|
out_fifo (tl->pcm_sample, 18, &tl->fr_ps, tl->sample_buf,
|
||||||
&tl->sample_w, SAMPLE_BUF_SIZE);
|
&tl->sample_w, SAMPLE_BUF_SIZE);
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
g_print ("After: %d bytes left\n", h_bytes_avail (bb));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return MP3TL_ERR_OK;
|
return MP3TL_ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue