Mercurial > mplayer.hg
changeset 3291:2122a13b5a29
fixed startup crash
author | iive |
---|---|
date | Mon, 03 Dec 2001 17:14:36 +0000 |
parents | 3928aef86033 |
children | 7fa3a928631a |
files | libmpdemux/stream.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/stream.c Mon Dec 03 17:12:07 2001 +0000 +++ b/libmpdemux/stream.c Mon Dec 03 17:14:36 2001 +0000 @@ -212,6 +212,9 @@ stream_t* new_stream(int fd,int type){ stream_t *s=malloc(sizeof(stream_t)); + if(s==NULL) return NULL; + memset(s,0,sizeof(stream_t)); + s->fd=fd; s->type=type; s->buf_pos=s->buf_len=0;