]> git.sesse.net Git - vlc/commitdiff
Add some sane default values.
authorJean-Paul Saman <jpsaman@videolan.org>
Tue, 10 Jun 2008 08:55:32 +0000 (10:55 +0200)
committerJean-Paul Saman <jpsaman@videolan.org>
Sat, 14 Jun 2008 08:09:05 +0000 (10:09 +0200)
projects/activex/vlccontrol2.cpp

index 26548c0ac026e033e8ee0ab5b20188e69ad9f596..499986d95485c6957ff6733b5a35055917fa1dc0 100644 (file)
@@ -404,6 +404,7 @@ STDMETHODIMP VLCInput::get_length(double* length)
 {
     if( NULL == length )
         return E_POINTER;
+    *length = 0;
 
     libvlc_instance_t* p_libvlc;
     HRESULT hr = _p_instance->getVLC(&p_libvlc);
@@ -434,6 +435,7 @@ STDMETHODIMP VLCInput::get_position(double* position)
     if( NULL == position )
         return E_POINTER;
 
+    *position = 0.0f;
     libvlc_instance_t* p_libvlc;
     HRESULT hr = _p_instance->getVLC(&p_libvlc);
     if( SUCCEEDED(hr) )
@@ -1630,6 +1632,7 @@ STDMETHODIMP VLCPlaylist::get_itemCount(long* count)
     if( NULL == count )
         return E_POINTER;
 
+    *count = 0;
     libvlc_instance_t* p_libvlc;
     HRESULT hr = _p_instance->getVLC(&p_libvlc);
     if( SUCCEEDED(hr) )