- libvlc ABIs: test that demux is available before accessing it in libvlc_input_get_fps()
authorDamien Fouilleul <damienf@videolan.org>
Fri, 2 Mar 2007 13:55:22 +0000 (13:55 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Fri, 2 Mar 2007 13:55:22 +0000 (13:55 +0000)
src/control/input.c

index b4a20fb..140b018 100644 (file)
@@ -144,7 +144,8 @@ float libvlc_input_get_fps( libvlc_input_t *p_input,
     if ( libvlc_exception_raised( p_e ) )
         return 0.0;
 
-    if( demux2_Control( p_input_thread->p->input.p_demux, DEMUX_GET_FPS, &f_fps )
+    if( (NULL == p_input_thread->p->input.p_demux)
+        || demux2_Control( p_input_thread->p->input.p_demux, DEMUX_GET_FPS, &f_fps )
         || f_fps < 0.1 )
     {
         vlc_object_release( p_input_thread );