mciwave: Prevent division by zero when processing non-PCM codec.
This commit is contained in:
parent
417ae04ed9
commit
0b9cab02c4
|
@ -204,7 +204,7 @@ static DWORD WAVE_ConvertByteToTimeFormat(WINE_MCIWAVE* wmw, DWORD val, LPDWORD
|
||||||
ret = val;
|
ret = val;
|
||||||
break;
|
break;
|
||||||
case MCI_FORMAT_SAMPLES: /* FIXME: is this correct ? */
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
WARN("Bad time format %u!\n", wmw->dwMciTimeFormat);
|
WARN("Bad time format %u!\n", wmw->dwMciTimeFormat);
|
||||||
|
|
Loading…
Reference in New Issue