Mercurial > mplayer.hg
comparison stream/tvi_dshow.c @ 25059:501f31700e77
Prevent chains from building more than once.
author | voroshil |
---|---|
date | Sun, 18 Nov 2007 05:20:17 +0000 |
parents | ac9507b338ac |
children | 96c96edb3d2f |
comparison
equal
deleted
inserted
replaced
25058:ac9507b338ac | 25059:501f31700e77 |
---|---|
2409 */ | 2409 */ |
2410 static HRESULT build_video_chain(priv_t *priv) | 2410 static HRESULT build_video_chain(priv_t *priv) |
2411 { | 2411 { |
2412 HRESULT hr; | 2412 HRESULT hr; |
2413 | 2413 |
2414 if(priv->v_buf) | |
2415 return S_OK; | |
2416 | |
2414 if (priv->pVideoStreamConfig) { | 2417 if (priv->pVideoStreamConfig) { |
2415 hr = OLE_CALL_ARGS(priv->pVideoStreamConfig, SetFormat, priv->pmtVideo); | 2418 hr = OLE_CALL_ARGS(priv->pVideoStreamConfig, SetFormat, priv->pmtVideo); |
2416 if (FAILED(hr)) { | 2419 if (FAILED(hr)) { |
2417 mp_msg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableSelectVideoFormat, (unsigned int)hr); | 2420 mp_msg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableSelectVideoFormat, (unsigned int)hr); |
2418 } | 2421 } |
2445 */ | 2448 */ |
2446 static HRESULT build_audio_chain(priv_t *priv) | 2449 static HRESULT build_audio_chain(priv_t *priv) |
2447 { | 2450 { |
2448 HRESULT hr; | 2451 HRESULT hr; |
2449 | 2452 |
2453 if(priv->a_buf) | |
2454 return S_OK; | |
2455 | |
2450 if(priv->immediate_mode) | 2456 if(priv->immediate_mode) |
2451 return S_OK; | 2457 return S_OK; |
2452 | 2458 |
2453 if (priv->pAudioStreamConfig) { | 2459 if (priv->pAudioStreamConfig) { |
2454 hr = OLE_CALL_ARGS(priv->pAudioStreamConfig, SetFormat, | 2460 hr = OLE_CALL_ARGS(priv->pAudioStreamConfig, SetFormat, |
2486 */ | 2492 */ |
2487 static HRESULT build_vbi_chain(priv_t *priv) | 2493 static HRESULT build_vbi_chain(priv_t *priv) |
2488 { | 2494 { |
2489 #ifdef HAVE_TV_TELETEXT | 2495 #ifdef HAVE_TV_TELETEXT |
2490 HRESULT hr; | 2496 HRESULT hr; |
2497 | |
2498 if(priv->vbi_buf) | |
2499 return S_OK; | |
2491 | 2500 |
2492 if(priv->tv_param->tdevice) | 2501 if(priv->tv_param->tdevice) |
2493 { | 2502 { |
2494 priv->vbi_buf=calloc(1,sizeof(grabber_ringbuffer_t)); | 2503 priv->vbi_buf=calloc(1,sizeof(grabber_ringbuffer_t)); |
2495 if(!priv->vbi_buf) | 2504 if(!priv->vbi_buf) |