changeset 25093:e701372dad8b

Fix mplayer crash caused by r25116
author voroshil
date Tue, 20 Nov 2007 17:19:16 +0000
parents d0915fdc7c6d
children e27cb70d2302
files stream/tvi_dshow.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stream/tvi_dshow.c	Tue Nov 20 17:08:12 2007 +0000
+++ b/stream/tvi_dshow.c	Tue Nov 20 17:19:16 2007 +0000
@@ -2146,6 +2146,16 @@
     if (!pBuilder || !chain->pCaptureFilter)
 	return E_POINTER;
 
+    if (!chain->pCapturePin)
+    {
+        hr = OLE_CALL_ARGS(pBuilder, FindPin,
+    		   (IUnknown *) chain->pCaptureFilter,
+    		   PINDIR_OUTPUT, &PIN_CATEGORY_CAPTURE,
+    		   chain->majortype, FALSE, 0, &chain->pCapturePin);
+
+        if (!chain->pCapturePin)
+            return E_POINTER;
+    }
     if (chain->type == video) {
 	size = sizeof(VIDEO_STREAM_CONFIG_CAPS);
     } else if (chain->type == audio) {