From: Miguel F. <mig...@us...> - 2001-11-19 22:31:37
|
Update of /cvsroot/xine/xine-lib/src/input In directory usw-pr-cvs1:/tmp/cvs-serv13612/src/input Modified Files: read_cache.c Log Message: Fix macro buffer leakage Index: read_cache.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/input/read_cache.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- read_cache.c 2001/11/17 14:26:38 1.7 +++ read_cache.c 2001/11/19 22:31:35 1.8 @@ -204,6 +204,8 @@ } else { + this->cur_mbuf = NULL; + while (this->mbuf_pool_top==NULL) { pthread_cond_wait (&this->mbuf_pool_not_empty, &this->lock); } @@ -216,6 +218,8 @@ mbuf->adr = madr; mbuf->ref = 0; mbuf->size_valid = 0; + + this->cur_mbuf = mbuf; if (lseek (this->fd, madr, SEEK_SET) < 0) { fprintf(stderr, "read_cache: can't seek to offset %lld (%s)\n", @@ -230,8 +234,6 @@ } mbuf->size_valid = bytes_read; } - - this->cur_mbuf = mbuf; } else { mbuf = this->cur_mbuf; |