aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-16 18:59:35 +0000
committerGravatar voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-16 18:59:35 +0000
commit13df91222fce40d1b60d79696319ab8d07ddf94e (patch)
treec43dfa8b3e30923fe0b7dcc49e678b418da26a6a
parentb4355b2f1d52b1b68bbe3dd632e1f7e713d589a5 (diff)
Make sure that mplayer will receive actual media type
instead of requested value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25057 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--stream/tvi_dshow.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/stream/tvi_dshow.c b/stream/tvi_dshow.c
index 1c7d70d906..fbd7a189e7 100644
--- a/stream/tvi_dshow.c
+++ b/stream/tvi_dshow.c
@@ -1307,6 +1307,8 @@ static HRESULT build_sub_graph(priv_t * priv, IBaseFilter * pCaptureFilter,
{
HRESULT hr;
+ AM_MEDIA_TYPE conn_mt; //Media type of established connection
+
IPin *pSGIn;
IPin *pSGOut;
IPin *pNRIn=NULL;
@@ -1396,6 +1398,12 @@ static HRESULT build_sub_graph(priv_t * priv, IBaseFilter * pCaptureFilter,
mp_msg(MSGT_TV,MSGL_DBG2,"tvi_dshow: Unable to create pCapturePin<->pSGIn connection. Error:0x%x\n", (unsigned int)hr);
break;
}
+ hr = OLE_CALL_ARGS(pCapturePin, ConnectionMediaType, &conn_mt);
+ 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){
IEnumFilters* pEnum;
@@ -1449,6 +1457,11 @@ static HRESULT build_sub_graph(priv_t * priv, IBaseFilter * pCaptureFilter,
hr = S_OK;
} while(0);
+
+ FreeMediaType(pmt);
+ CopyMediaType(pmt, &conn_mt);
+ FreeMediaType(&conn_mt);
+
OLE_RELEASE_SAFE(pSGF);
OLE_RELEASE_SAFE(pSGIn);
OLE_RELEASE_SAFE(pSGOut);