summaryrefslogtreecommitdiff
path: root/apps/codecs/libpcm
diff options
context:
space:
mode:
authorYoshihisa Uchida <uchida@rockbox.org>2010-03-13 05:53:54 +0000
committerYoshihisa Uchida <uchida@rockbox.org>2010-03-13 05:53:54 +0000
commit0996bbd27895874ce8b7738e839fb82e068a30fc (patch)
tree0e22744757cf4c268ea272d8087683e8e6f4647e /apps/codecs/libpcm
parent4446d1bc857b41e491d04b05eeccc873a206fd18 (diff)
downloadrockbox-0996bbd27895874ce8b7738e839fb82e068a30fc.zip
rockbox-0996bbd27895874ce8b7738e839fb82e068a30fc.tar.gz
rockbox-0996bbd27895874ce8b7738e839fb82e068a30fc.tar.bz2
rockbox-0996bbd27895874ce8b7738e839fb82e068a30fc.tar.xz
corrects the smaf parser the following.
- It is normally retrieved even if the position of wave data is not in given position from the head. - The problem that artist/title/composer cannot be given normally when the character code != iso8859-1, utf-8. - The problem that the position of chunk does not given correctly some mmf files. - artist/title/composer stored in not id3v1buf but id3v2buf. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25141 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libpcm')
-rw-r--r--apps/codecs/libpcm/yamaha_adpcm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/codecs/libpcm/yamaha_adpcm.c b/apps/codecs/libpcm/yamaha_adpcm.c
index 9f1a474..0b997ad 100644
--- a/apps/codecs/libpcm/yamaha_adpcm.c
+++ b/apps/codecs/libpcm/yamaha_adpcm.c
@@ -82,6 +82,12 @@ static bool set_format(struct pcm_format *format)
{
fmt = format;
+ if (fmt->channels == 0)
+ {
+ DEBUGF("CODEC_ERROR: channels is 0\n");
+ return false;
+ }
+
if (fmt->bitspersample != 4)
{
DEBUGF("CODEC_ERROR: yamaha adpcm must be 4 bitspersample: %d\n",