diff options
author | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-18 12:34:06 +0000 |
---|---|---|
committer | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-18 12:34:06 +0000 |
commit | c7256fa6f97e8a684ebfee9617dabd12d595a90a (patch) | |
tree | 8dc8f83678971d5a5b44a4038fae5835ee75e095 | |
parent | 9d80dcfa3d23378eb9b8c0c3f8b4894c96abf86a (diff) | |
download | mpv-c7256fa6f97e8a684ebfee9617dabd12d595a90a.tar.bz2 mpv-c7256fa6f97e8a684ebfee9617dabd12d595a90a.tar.xz |
implemented M_PROPERTY_SET in mp_property_{audio,video}
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21016 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | mplayer.c | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -1795,7 +1795,7 @@ static int mp_property_channels(m_option_t* prop,int action,void* arg) { /// Selected audio id (RW) static int mp_property_audio(m_option_t* prop,int action,void* arg) { - int current_id = -1; + int current_id = -1, tmp; if(!sh_audio) return M_PROPERTY_UNAVAILABLE; @@ -1829,8 +1829,13 @@ static int mp_property_audio(m_option_t* prop,int action,void* arg) { return M_PROPERTY_OK; case M_PROPERTY_STEP_UP: + case M_PROPERTY_SET: + if(action==M_PROPERTY_SET && arg) + tmp = *((int*)arg); + else + tmp = -1; current_id = demuxer->audio->id; - audio_id = demuxer_switch_audio(demuxer, -1); + audio_id = demuxer_switch_audio(demuxer, tmp); if(audio_id > -1 && demuxer->audio->id != current_id) { sh_audio_t *sh2; uninit_player(INITED_AO | INITED_ACODEC); @@ -1852,7 +1857,7 @@ static int mp_property_audio(m_option_t* prop,int action,void* arg) { static int reinit_video_chain(void); /// Selected video id (RW) static int mp_property_video(m_option_t* prop,int action,void* arg) { - int current_id = -1; + int current_id = -1, tmp; if(!sh_video) return M_PROPERTY_UNAVAILABLE; @@ -1874,8 +1879,13 @@ static int mp_property_video(m_option_t* prop,int action,void* arg) { return M_PROPERTY_OK; case M_PROPERTY_STEP_UP: + case M_PROPERTY_SET: current_id = demuxer->video->id; - video_id = demuxer_switch_video(demuxer, -1); + if(action==M_PROPERTY_SET && arg) + tmp = *((int*)arg); + else + tmp = -1; + video_id = demuxer_switch_video(demuxer, tmp); if(video_id > -1 && demuxer->video->id != current_id) { sh_video_t *sh2; uninit_player(INITED_VCODEC | (fixed_vo ? 0 : INITED_VO)); |