mirror of
https://github.com/mpv-player/mpv
synced 2025-03-05 05:37:37 +00:00
Combine code for check availability of property audio(id).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25491 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
376bbbdae0
commit
61d91f8196
@ -731,17 +731,16 @@ static int mp_property_audio(m_option_t * prop, int action, void *arg,
|
|||||||
{
|
{
|
||||||
int current_id = -1, tmp;
|
int current_id = -1, tmp;
|
||||||
|
|
||||||
|
if (!mpctx->sh_audio)
|
||||||
|
return M_PROPERTY_UNAVAILABLE;
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case M_PROPERTY_GET:
|
case M_PROPERTY_GET:
|
||||||
if (!mpctx->sh_audio)
|
|
||||||
return M_PROPERTY_UNAVAILABLE;
|
|
||||||
if (!arg)
|
if (!arg)
|
||||||
return M_PROPERTY_ERROR;
|
return M_PROPERTY_ERROR;
|
||||||
*(int *) arg = audio_id;
|
*(int *) arg = audio_id;
|
||||||
return M_PROPERTY_OK;
|
return M_PROPERTY_OK;
|
||||||
case M_PROPERTY_PRINT:
|
case M_PROPERTY_PRINT:
|
||||||
if (!mpctx->sh_audio)
|
|
||||||
return M_PROPERTY_UNAVAILABLE;
|
|
||||||
if (!arg)
|
if (!arg)
|
||||||
return M_PROPERTY_ERROR;
|
return M_PROPERTY_ERROR;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user