changeset 25060:96c96edb3d2f

Fix crash when pin connection fails.
author voroshil
date Sun, 18 Nov 2007 06:16:37 +0000
parents 501f31700e77
children 1f0eb7aa3206
files stream/tvi_dshow.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/tvi_dshow.c	Sun Nov 18 05:20:17 2007 +0000
+++ b/stream/tvi_dshow.c	Sun Nov 18 06:16:37 2007 +0000
@@ -1320,6 +1320,7 @@
     ISampleGrabber *pSG = NULL;
 
     hr=S_OK;
+    CopyMediaType(&conn_mt, pmt);
     do{
         hr = OLE_CALL_ARGS(priv->pBuilder, FindPin,
     		   (IUnknown *) pCaptureFilter,
@@ -1402,7 +1403,6 @@
         if(FAILED(hr))
         {
             mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TVI_DS_GetActualMediatypeFailed, (unsigned int)hr);
-            CopyMediaType(&conn_mt, pmt);
         }
 
         if(priv->tv_param->hidden_video_renderer){