/*****************************************************************************
* DirectShow GUIDs.
*****************************************************************************/
-const GUID PROPSETID_TUNER = {0x6a2e0605, 0x28e4, 0x11d0, {0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56}};
+static const GUID PROPSETID_TUNER = {0x6a2e0605, 0x28e4, 0x11d0, {0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56}};
/****************************************************************************
* The following should be in ks.h and ksmedia.h, but since they are not in
if (FAILED(hr))
{
msg_Dbg( p_this, "Couldn't QI for IKsPropertySet" );
+ p_TV->Release();
return;
}
else
{
msg_Dbg( p_this, "KSPROPERTY_TUNER_MODE_CAPS not supported!" );
- return;
+ goto free_on_error;
}
msg_Dbg( p_this, "Frequency range supproted from %d to %d.", ModeCaps.MinFrequency, ModeCaps.MaxFrequency);
if(FAILED(hr))
{
msg_Dbg( p_this, "Couldn't set KSPROPERTY_TUNER_FREQUENCY!" );
- return;
+ goto free_on_error;
}
}
else
{
msg_Dbg( p_this, "Requested frequency exceeds the supported range!" );
- return;
+ goto free_on_error;
}
}
if(FAILED(hr))
{
msg_Dbg( p_this, "Couldn't set KSPROPERTY_TUNER_STANDARD!" );
- return;
+ goto free_on_error;
}
}
else
{
msg_Dbg( p_this, "Requested video standard is not supported by the tuner!" );
- return;
+ goto free_on_error;
}
}
+free_on_error:
pKs->Release();
}