xbadpcm: fix crash on invalid input file
authorAnssi Hannula <anssi@xbmc.org>
Sat, 31 Aug 2013 08:30:32 +0000 (11:30 +0300)
committerAnssi Hannula <anssi@xbmc.org>
Sat, 31 Aug 2013 08:33:21 +0000 (11:33 +0300)
commit983a3884fa17880599021434a929163acea5399f
treeb9e976db7e495ff9cf2434fbcaaa3eb693703ff2
parent991fb671bf84bb112651f3c625ad7beb64f2a2f0
xbadpcm: fix crash on invalid input file

If the sample rate or channel count is zero on a file opened with
ADPCMDll, a division by zero is performed causing XBMC to crash.

Fix that by adding the necessary check.
lib/xbadpcm/ADPCMDll.cpp