comparison audacious/playback.c @ 1672:600efc52c645 trunk

[svn] - be careful about referencing a NULL widget (e.g. headless/serveronly mode crashes on streams, bug #562)
author nenolod
date Tue, 12 Sep 2006 23:11:07 -0700
parents a6e6d3500c13
children 30d40252862d
comparison
equal deleted inserted replaced
1671:daabad781796 1672:600efc52c645
122 if (!get_current_input_plugin()) 122 if (!get_current_input_plugin())
123 return; 123 return;
124 124
125 ip_data.paused = !ip_data.paused; 125 ip_data.paused = !ip_data.paused;
126 126
127 if (get_current_input_plugin()->pause)
128 get_current_input_plugin()->pause(ip_data.paused);
129
130 g_return_if_fail(mainwin_playstatus != NULL);
131
127 if (ip_data.paused) 132 if (ip_data.paused)
128 playstatus_set_status(mainwin_playstatus, STATUS_PAUSE); 133 playstatus_set_status(mainwin_playstatus, STATUS_PAUSE);
129 else 134 else
130 playstatus_set_status(mainwin_playstatus, STATUS_PLAY); 135 playstatus_set_status(mainwin_playstatus, STATUS_PLAY);
131
132 if (get_current_input_plugin()->pause)
133 get_current_input_plugin()->pause(ip_data.paused);
134 } 136 }
135 137
136 void 138 void
137 bmp_playback_stop(void) 139 bmp_playback_stop(void)
138 { 140 {
154 mainwin_set_info_text(); 156 mainwin_set_info_text();
155 } 157 }
156 } 158 }
157 159
158 ip_data.buffering = FALSE; 160 ip_data.buffering = FALSE;
161 ip_data.playing = FALSE;
162
163 g_return_if_fail(mainwin_playstatus != NULL);
164
159 playstatus_set_status_buffering(mainwin_playstatus, FALSE); 165 playstatus_set_status_buffering(mainwin_playstatus, FALSE);
160 ip_data.playing = FALSE;
161 } 166 }
162 167
163 void 168 void
164 bmp_playback_stop_reentrant(void) 169 bmp_playback_stop_reentrant(void)
165 { 170 {