[vlc-commits] Cast read size to signed before the substraction.

Denis Charmet git at videolan.org
Tue Jul 29 23:54:13 CEST 2014


vlc | branch: master | Denis Charmet <typx at dinauz.org> | Tue Jul 29 23:51:32 2014 +0200| [674e38ba743a0a9ae4ca176c4162be1502eb3335] | committer: Denis Charmet

Cast read size to signed before the substraction.

Close #11481

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=674e38ba743a0a9ae4ca176c4162be1502eb3335
---

 modules/audio_output/directsound.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c
index 8ec0fd6..7db4458 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -155,7 +155,7 @@ static HRESULT TimeGet( aout_stream_sys_t *sys, mtime_t *delay )
     if( hr != DS_OK )
         return hr;
 
-    size = read - sys->i_last_read;
+    size = (mtime_t)read - sys->i_last_read;
 
     /* GetCurrentPosition cannot be trusted if the return doesn't change
      * Just return an error */



More information about the vlc-commits mailing list