# HG changeset patch # User William Pitcock # Date 1185399247 18000 # Node ID 616d34396eeffa5e221ac6ae2c88c674b52a8e91 # Parent f611c44cc67baf273f5a2b680247db9455ea9506 vorbis: Use nominal bitrate instead of updating every time the bitrate changes. That behaviour is just braindead. diff -r f611c44cc67b -r 616d34396eef src/vorbis/vorbis.c --- a/src/vorbis/vorbis.c Wed Jul 25 16:06:23 2007 -0500 +++ b/src/vorbis/vorbis.c Wed Jul 25 16:34:07 2007 -0500 @@ -482,7 +482,7 @@ title = vorbis_generate_title(&vf, filename); use_rg = vorbis_update_replaygain(&rg_scale); - br = ov_bitrate(&vf, -1); + br = vi->bitrate_nominal / 1000; g_mutex_unlock(vf_mutex); @@ -532,8 +532,6 @@ else time = ov_time_total(&vf, -1) * 1000; - br = ov_bitrate(&vf, current_section); - g_mutex_unlock(vf_mutex); vorbis_ip.set_info(title, time, br, samplerate, channels); @@ -541,21 +539,6 @@ last_section = current_section; } - - if (!(vi->bitrate_upper == vi->bitrate_lower && vi->bitrate_upper == vi->bitrate_nominal) - && (playback->output->output_time() > timercount + 1000 - || playback->output->output_time() < timercount)) { - /* - * simple hack to avoid updating too - * often - */ - g_mutex_lock(vf_mutex); - br = ov_bitrate_instant(&vf); - g_mutex_unlock(vf_mutex); - if (br > 0) - vorbis_ip.set_info(title, time, br, samplerate, channels); - timercount = playback->output->output_time(); - } } if (!playback->error) playback->output->close_audio();