Commit fb0a52a3 authored by Max Kellermann's avatar Max Kellermann

decoder/mad, output_thread: add gcc_unlikely()

parent c852970c
......@@ -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);
......
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