]> git.sesse.net Git - vlc/blobdiff - modules/demux/live555.cpp
ts: Fix audio type description parsing
[vlc] / modules / demux / live555.cpp
index 2fb2c8687f8b997e0f328d67b90bad2fa98a733c..93433a725d8fa18e20be9d4b60b1deaeb244d152 100644 (file)
@@ -32,6 +32,7 @@
  * Note: config.h may include inttypes.h, so make sure we define this option
  * early enough. */
 #define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -654,7 +655,12 @@ describe:
             if( i_code == 0 )
                 msg_Dbg( p_demux, "connection timeout" );
             else
+            {
                 msg_Dbg( p_demux, "connection error %d", i_code );
+                if( i_code == 403 )
+                    dialog_Fatal( p_demux, _("RTSP connection failed"),
+                                  _("Access to the stream is denied by the server configuration.") );
+            }
             if( p_sys->rtsp ) RTSPClient::close( p_sys->rtsp );
             p_sys->rtsp = NULL;
         }
@@ -1350,7 +1356,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             pi64 = (int64_t*)va_arg( args, int64_t * );
             if( p_sys->f_npt_length > 0 )
             {
-                *pi64 = (int64_t)(p_sys->f_npt_length * 1000000.0);
+                double d_length = p_sys->f_npt_length * 1000000.0;
+                if( d_length >= INT64_MAX )
+                    *pi64 = INT64_MAX;
+                else
+                    *pi64 = (int64_t)d_length;
                 return VLC_SUCCESS;
             }
             return VLC_EGENERIC;