From 28b0c58726bf0a42da3433d2d1ca5f0e559d9bd1 Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Wed, 11 Jul 2007 16:58:11 +0000 Subject: 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 --- apps/codecs/libwma/wmadeci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/codecs/libwma') 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) if (wfx->codec_id == ASF_CODEC_ID_WMAV1){ s->version = 1; - }else{ + }else if (wfx->codec_id == ASF_CODEC_ID_WMAV2 ){ s->version = 2; + }else{ + /*one of those other wma flavors that don't have GPLed decoders */ + return -1; } /* extract flag infos */ -- cgit v1.2.3