diff options
| author | Michael Giacomelli <giac2000@hotmail.com> | 2008-12-20 01:38:34 +0000 |
|---|---|---|
| committer | Michael Giacomelli <giac2000@hotmail.com> | 2008-12-20 01:38:34 +0000 |
| commit | 0301ed559451ba4561b21e438d29b9ee29e31353 (patch) | |
| tree | 1265d036f870d8d85374fadfb9a128db5ffa2ef4 /apps/codecs | |
| parent | 0df38260e86e05a2cc61f41c4b43612a111b342a (diff) | |
| download | rockbox-0301ed559451ba4561b21e438d29b9ee29e31353.zip rockbox-0301ed559451ba4561b21e438d29b9ee29e31353.tar.gz rockbox-0301ed559451ba4561b21e438d29b9ee29e31353.tar.bz2 rockbox-0301ed559451ba4561b21e438d29b9ee29e31353.tar.xz | |
Fix bug where a mono file using noise coding would be corrupted if it was played immediately after a stereo files using noise coding due to incorrect initialization of the decoder state. Thanks to Tom Ross for pointing out that initialization was incomplete on these files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19494 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
| -rw-r--r-- | apps/codecs/libwma/wmadeci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index d362c6d..4c06ad0 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c @@ -328,6 +328,9 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE); #endif + s->channel_coded[0]=0; + s->channel_coded[1]=0; + s->sample_rate = wfx->rate; s->nb_channels = wfx->channels; s->bit_rate = wfx->bitrate; @@ -1434,7 +1437,7 @@ static int wma_decode_frame(WMADecodeContext *s, int32_t *samples) /* read each block */ s->block_num = 0; s->block_pos = 0; - + for(;;) { @@ -1483,7 +1486,7 @@ int wma_decode_superframe_init(WMADecodeContext* s, s->last_superframe_len = 0; return 0; } - + s->current_frame = 0; init_get_bits(&s->gb, buf, buf_size*8); |