[MPlayer-cvslog] r26929 - trunk/stream/cache2.c
reimar
subversion at mplayerhq.hu
Fri May 30 17:20:43 CEST 2008
Author: reimar
Date: Fri May 30 17:20:42 2008
New Revision: 26929
Log:
Handle NULL control function in cache_execute_control, fixes crash with http urls.
Modified:
trunk/stream/cache2.c
Modified: trunk/stream/cache2.c
==============================================================================
--- trunk/stream/cache2.c (original)
+++ trunk/stream/cache2.c Fri May 30 17:20:42 2008
@@ -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)
More information about the MPlayer-cvslog
mailing list