[vlc-commits] asx: handle large start/stop times w/o overflow

Rémi Denis-Courmont git at videolan.org
Fri May 4 10:38:02 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri May  4 11:32:15 2018 +0300| [ba3c30381ca594d953412692b9b6332f2049fd3a] | committer: Rémi Denis-Courmont

asx: handle large start/stop times w/o overflow

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

 modules/demux/playlist/asx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/demux/playlist/asx.c b/modules/demux/playlist/asx.c
index f1fcfa20b0..9c351773d1 100644
--- a/modules/demux/playlist/asx.c
+++ b/modules/demux/playlist/asx.c
@@ -296,13 +296,15 @@ static void ProcessEntry( int *pi_n_entry, xml_reader_t *p_xml_reader,
                 i_options = 0;
                 if( i_start )
                 {
-                    if( asprintf( ppsz_options, ":start-time=%d" ,(int) i_start/CLOCK_FREQ ) != -1)
+                    if( asprintf( ppsz_options, ":start-time=%"PRId64 ,
+                                  i_start / CLOCK_FREQ ) != -1)
                         i_options++;
                 }
                 if( i_duration)
                 {
-                    if( asprintf( ppsz_options + i_options, ":stop-time=%d",
-                                (int) (i_start+i_duration)/CLOCK_FREQ ) != -1)
+                    if( asprintf( ppsz_options + i_options,
+                                  ":stop-time=%"PRId64,
+                                  (i_start + i_duration) / CLOCK_FREQ ) != -1)
                         i_options++;
                 }
 



More information about the vlc-commits mailing list