]> git.sesse.net Git - vlc/commitdiff
* modules/access/dshow/filter.cpp: fixed crash.
authorGildas Bazin <gbazin@videolan.org>
Mon, 1 Nov 2004 12:58:39 +0000 (12:58 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 1 Nov 2004 12:58:39 +0000 (12:58 +0000)
modules/access/dshow/filter.cpp

index 06f284ee617cb884b458258ccbf42ef1f005c414..477677210ceca2c5f3326f2c00afd209f812a4c2 100644 (file)
@@ -615,7 +615,7 @@ STDMETHODIMP CapturePin::QueryAccept( const AM_MEDIA_TYPE *pmt )
                  ((VIDEOINFOHEADER *)pmt->pbFormat)->bmiHeader.biHeight,
                  (char *)&i_fourcc );
     }
-    else
+    else if( pmt->majortype == MEDIATYPE_Audio )
     {
         msg_Dbg( p_input, "CapturePin::QueryAccept [OK] (channels=%d, "
                  "samples/sec=%lu, bits/samples=%d, format=%4.4s)",
@@ -624,6 +624,11 @@ STDMETHODIMP CapturePin::QueryAccept( const AM_MEDIA_TYPE *pmt )
                  ((WAVEFORMATEX *)pmt->pbFormat)->wBitsPerSample,
                  (char *)&i_fourcc );
     }   
+    else
+    {
+        msg_Dbg( p_input, "CapturePin::QueryAccept [OK] (stream format=%4.4s)",
+                 (char *)&i_fourcc );
+    }
 
     if( p_connected_pin )
     {