diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-08-20 03:00:43 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-08-20 03:00:43 -0700 |
commit | 77703f7a41745943ef30d5e888108977bfad6e35 (patch) | |
tree | ef1e0f3cac055be7b77fa1590a9326367a59fa8f /src/inputPlugins | |
parent | 528494a1b13723ba310641c42e41edc4282f6d5a (diff) | |
download | mpd-77703f7a41745943ef30d5e888108977bfad6e35.tar.gz mpd-77703f7a41745943ef30d5e888108977bfad6e35.tar.xz mpd-77703f7a41745943ef30d5e888108977bfad6e35.zip |
mp3_plugin: fix assertion during seeking
data->muteFrame won't necessarily get cleared when it
enters that block of code, so we don't signal the action
as complete until it is actually cleared.
Diffstat (limited to 'src/inputPlugins')
-rw-r--r-- | src/inputPlugins/mp3_plugin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index 10a914a91..5bbd7601f 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -880,13 +880,13 @@ static int mp3Read(mp3DecodeData * data, ReplayGainInfo ** replayGainInfo) data->muteFrame = 0; break; case MUTEFRAME_SEEK: - dc_action_begin(); - assert(dc.action == DC_ACTION_SEEK); if (dc.seek_where <= data->elapsedTime) { + dc_action_begin(); + assert(dc.action == DC_ACTION_SEEK); data->outputPtr = data->outputBuffer; data->muteFrame = 0; + dc_action_end(); } - dc_action_end(); break; default: mad_synth_frame(&data->synth, &data->frame); |