1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 17:42:17 +00:00

stream_check_interrupt should sleep even if no callback is set.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31255 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-05-28 18:49:02 +00:00
parent 27d41fa5b3
commit 6b255e5083

View File

@ -486,7 +486,10 @@ void stream_set_interrupt_callback(int (*cb)(int)) {
} }
int stream_check_interrupt(int time) { int stream_check_interrupt(int time) {
if(!stream_check_interrupt_cb) return 0; if(!stream_check_interrupt_cb) {
usec_sleep(time * 1000);
return 0;
}
return stream_check_interrupt_cb(time); return stream_check_interrupt_cb(time);
} }