decoder/mad, output_thread: add gcc_unlikely()
This commit is contained in:
parent
c852970cf6
commit
fb0a52a34a
@ -76,9 +76,9 @@ mad_fixed_to_24_sample(mad_fixed_t sample)
|
||||
sample = sample + (1L << (MAD_F_FRACBITS - bits));
|
||||
|
||||
/* clip */
|
||||
if (sample > MAX)
|
||||
if (gcc_unlikely(sample > MAX))
|
||||
sample = MAX;
|
||||
else if (sample < MIN)
|
||||
else if (gcc_unlikely(sample < MIN))
|
||||
sample = MIN;
|
||||
|
||||
/* quantize */
|
||||
|
@ -435,7 +435,7 @@ ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk)
|
||||
assert(ao != NULL);
|
||||
assert(ao->filter != NULL);
|
||||
|
||||
if (chunk->tag != NULL) {
|
||||
if (gcc_unlikely(chunk->tag != NULL)) {
|
||||
g_mutex_unlock(ao->mutex);
|
||||
ao_plugin_send_tag(ao, chunk->tag);
|
||||
g_mutex_lock(ao->mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user