Commit ccf162c9 authored by Daniel Amm's avatar Daniel Amm Committed by Jean-Baptiste Kempf

npapi: remove redundant checks

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 375a5e3c
......@@ -308,8 +308,8 @@ LibvlcAudioNPObject::setProperty(int index, const NPVariant &value)
auto tracks = mp.audioTrackDescription();
if ( v >= tracks.size() )
return INVOKERESULT_INVALID_VALUE;
if ( mp.setAudioTrack( tracks[v].id() ) )
return INVOKERESULT_NO_ERROR;
mp.setAudioTrack( tracks[v].id() );
return INVOKERESULT_NO_ERROR;
}
return INVOKERESULT_INVALID_VALUE;
case ID_audio_channel:
......@@ -1209,8 +1209,8 @@ LibvlcSubtitleNPObject::setProperty(int index, const NPVariant &value)
auto tracks = mp.spuDescription();
if ( v >= tracks.size() )
return INVOKERESULT_INVALID_ARGS;
if ( mp.setSpu( tracks[ v ].id() ) )
return INVOKERESULT_NO_ERROR;
mp.setSpu( tracks[ v ].id() );
return INVOKERESULT_NO_ERROR;
}
return INVOKERESULT_INVALID_VALUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment