demux/asf: prevent signed integer overflow (fixes #17579)
demux/asf: prevent signed integer overflow (fixes #17579)

The previous implementation could overflow the mtime_t when
multiplying p_sys->p_fp->i_preroll by a thousand when converting from
the asf time unit (milliseconds) to VLCs (microseconds).

Given that you can always divide a value without running into issues
in terms of under/overflow, these changes prevent any overflow error
while still preserving the same logic.

In short the implementation takes advantage of the below two
conditions being equivalent:

   1: A > ( ( B * C ) + D )
   2: ( ( A - D ) / C ) > B

Signed-off-by: Rémi Denis-Courmont <f0699137713be92736351a0674e79536595e4a60@remlab.net>

xkfz007/vlc,xkfz007/vlc,xkfz007/vlc,xkfz007/vlc,xkfz007/vlc,xkfz007/vlc,xkfz007/vlc