1
mirror of https://github.com/mpv-player/mpv synced 2025-01-01 04:36:24 +01:00

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

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;