diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-05-30 15:20:42 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-05-30 15:20:42 +0000 |
commit | 09b97f48268ce10e22fb18082cfdbf35e93e7b2c (patch) | |
tree | b3a080c7d1b2bb7096cdc7b7a247bd213536057f /stream/cache2.c | |
parent | 71f6340af735f7035066a13b23b686b07008ca5f (diff) | |
download | mpv-09b97f48268ce10e22fb18082cfdbf35e93e7b2c.tar.bz2 mpv-09b97f48268ce10e22fb18082cfdbf35e93e7b2c.tar.xz |
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
Diffstat (limited to 'stream/cache2.c')
-rw-r--r-- | stream/cache2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/stream/cache2.c b/stream/cache2.c index 11d6574cf2..e0dba9936c 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -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) |