]> git.sesse.net Git - vlc/blobdiff - modules/access/fake.c
do not catch VLCException in sample
[vlc] / modules / access / fake.c
index 2e29b7d550bd9093b828281e6b94ca0703cb2ee9..93ae8516837152710ec2b0b2077a7366d9ba6613 100644 (file)
  * Preamble
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 #include <vlc_access.h>
 #include <vlc_demux.h>
@@ -102,7 +106,8 @@ static int Open( vlc_object_t *p_this )
     p_demux->info.i_title = 0;
     p_demux->info.i_seekpoint = 0;
 
-    p_sys->i_duration = var_CreateGetInteger( p_demux, "fake-duration" ) * 1000;
+    p_sys->i_duration =
+        (mtime_t)var_CreateGetInteger( p_demux, "fake-duration" ) * 1000;
     p_sys->f_fps = var_CreateGetFloat( p_demux, "fake-fps" );
 
     /* Declare the elementary stream */
@@ -141,6 +146,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     {
         /* Special for access_demux */
         case DEMUX_CAN_PAUSE:
+        case DEMUX_CAN_SEEK:
         case DEMUX_CAN_CONTROL_PACE:
             pb = (vlc_bool_t *)va_arg( args, vlc_bool_t * );
             *pb = VLC_TRUE;