mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
Handle NULL control function in cache_execute_control, fixes crash with http urls.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26929 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
71f6340af7
commit
09b97f4826
@ -200,6 +200,13 @@ int cache_fill(cache_vars_t* s){
|
||||
|
||||
static void cache_execute_control(cache_vars_t *s) {
|
||||
static unsigned last;
|
||||
if (!s->stream->control) {
|
||||
s->stream_time_length = 0;
|
||||
s->control_new_pos = 0;
|
||||
s->control_res = STREAM_UNSUPPORTED;
|
||||
s->control = -1;
|
||||
return;
|
||||
}
|
||||
if (GetTimerMS() - last > 99) {
|
||||
double len;
|
||||
if (s->stream->control(s->stream, STREAM_CTRL_GET_TIME_LENGTH, &len) == STREAM_OK)
|
||||
|
Loading…
Reference in New Issue
Block a user