Mercurial > mplayer.hg
changeset 26897:23c3741dc490
Handle NULL control function in cache_execute_control, fixes crash with http urls.
author | reimar |
---|---|
date | Fri, 30 May 2008 15:20:42 +0000 |
parents | 4559d4a7c3cb |
children | d9d4de238430 |
files | stream/cache2.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/cache2.c Fri May 30 12:09:06 2008 +0000 +++ b/stream/cache2.c Fri May 30 15:20:42 2008 +0000 @@ -200,6 +200,13 @@ 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)