Fix possible null-pointer-dereference in stream_fill_buffer().

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24991 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
cehoyos 2007-11-08 23:07:19 +00:00
parent 2fed92a167
commit 4be2fcb25e
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ int stream_fill_buffer(stream_t *s){
switch(s->type){
case STREAMTYPE_STREAM:
#ifdef MPLAYER_NETWORK
if( s->streaming_ctrl!=NULL ) {
if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_read ) {
len=s->streaming_ctrl->streaming_read(s->fd,s->buffer,STREAM_BUFFER_SIZE, s->streaming_ctrl);break;
} else {
len=read(s->fd,s->buffer,STREAM_BUFFER_SIZE);break;