Commit 0b9cab02 authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

mciwave: Prevent division by zero when processing non-PCM codec.

parent 417ae04e
......@@ -204,7 +204,7 @@ static DWORD WAVE_ConvertByteToTimeFormat(WINE_MCIWAVE* wmw, DWORD val, LPDWORD
ret = val;
break;
case MCI_FORMAT_SAMPLES: /* FIXME: is this correct ? */
ret = (val * 8) / wmw->lpWaveFormat->wBitsPerSample;
ret = (val * 8) / (wmw->lpWaveFormat->wBitsPerSample ? wmw->lpWaveFormat->wBitsPerSample : 1);
break;
default:
WARN("Bad time format %u!\n", wmw->dwMciTimeFormat);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment