diff options
author | Michael Giacomelli <giac2000@hotmail.com> | 2007-07-11 16:58:11 +0000 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2007-07-11 16:58:11 +0000 |
commit | 28b0c58726bf0a42da3433d2d1ca5f0e559d9bd1 (patch) | |
tree | db25dbcd0ec1fef6ce6032e5d4164a78136e3283 /apps/codecs/libwma | |
parent | de4904a189e761c5699d82c1b777a8e144a000f0 (diff) | |
download | rockbox-28b0c58726bf0a42da3433d2d1ca5f0e559d9bd1.tar.gz rockbox-28b0c58726bf0a42da3433d2d1ca5f0e559d9bd1.zip |
Don't assume files are WMAv2, instead actually check that they are and quit gracefully if they are not.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13855 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma')
-rw-r--r-- | apps/codecs/libwma/wmadeci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index 3a4e70dc15..3361325887 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c | |||
@@ -550,8 +550,11 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) | |||
550 | 550 | ||
551 | if (wfx->codec_id == ASF_CODEC_ID_WMAV1){ | 551 | if (wfx->codec_id == ASF_CODEC_ID_WMAV1){ |
552 | s->version = 1; | 552 | s->version = 1; |
553 | }else{ | 553 | }else if (wfx->codec_id == ASF_CODEC_ID_WMAV2 ){ |
554 | s->version = 2; | 554 | s->version = 2; |
555 | }else{ | ||
556 | /*one of those other wma flavors that don't have GPLed decoders */ | ||
557 | return -1; | ||
555 | } | 558 | } |
556 | 559 | ||
557 | /* extract flag infos */ | 560 | /* extract flag infos */ |