summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-10 17:39:07 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-10 17:39:07 +0000
commit830b241f3ff30e013db38be3077616f191289203 (patch)
tree79360743b078d3947a8d258e509f668bb9b4c1a3 /mplayer.c
parent320e68675a1976afd2fdc6e8bcd465634bea9b05 (diff)
downloadmpv-830b241f3ff30e013db38be3077616f191289203.tar.bz2
mpv-830b241f3ff30e013db38be3077616f191289203.tar.xz
Do not loose commands while paused.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13604 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mplayer.c b/mplayer.c
index eea2022871..6001438f67 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -628,7 +628,7 @@ void load_per_file_config (m_config_t* conf, const char *const file)
// The function return a new value for eof.
static int libmpdemux_was_interrupted(int eof) {
mp_cmd_t* cmd;
- if((cmd = mp_input_get_cmd(0,0)) != NULL) {
+ if((cmd = mp_input_get_cmd(0,0,0)) != NULL) {
switch(cmd->id) {
case MP_CMD_QUIT:
exit_player_with_rc(MSGTR_Exit_quit, (cmd->nargs > 0)? cmd->args[0].v.i : 0);
@@ -1234,7 +1234,7 @@ if(!noconsolecontrols && !slave_mode){
usec_sleep(20000);
guiEventHandling();
guiGetEvent( guiReDraw,NULL );
- if ( (cmd = mp_input_get_cmd(0,0)) != NULL) guiGetEvent( guiIEvent,(char *)cmd->id );
+ if ( (cmd = mp_input_get_cmd(0,0,0)) != NULL) guiGetEvent( guiIEvent,(char *)cmd->id );
}
guiGetEvent( guiSetParameters,NULL );
if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM )
@@ -2468,7 +2468,7 @@ if(auto_quality>0){
if (audio_out && sh_audio)
audio_out->pause(); // pause audio, keep data if possible
- while( (cmd = mp_input_get_cmd(20,1)) == NULL) {
+ while( (cmd = mp_input_get_cmd(20,1,1)) == NULL) {
if(sh_video && video_out && vo_config_count) video_out->check_events();
#ifdef HAVE_NEW_GUI
if(use_gui){
@@ -2483,7 +2483,10 @@ if(auto_quality>0){
#endif
usec_sleep(20000);
}
+ if (cmd->id == MP_CMD_PAUSE) {
+ cmd = mp_input_get_cmd(0,1,0);
mp_cmd_free(cmd);
+ }
osd_function=OSD_PLAY;
if (audio_out && sh_audio)
audio_out->resume(); // resume audio
@@ -2548,7 +2551,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
{
mp_cmd_t* cmd;
int brk_cmd = 0;
- while( !brk_cmd && (cmd = mp_input_get_cmd(0,0)) != NULL) {
+ while( !brk_cmd && (cmd = mp_input_get_cmd(0,0,0)) != NULL) {
switch(cmd->id) {
case MP_CMD_SEEK : {
int v,abs;