Mercurial > libdvdnav.hg
diff dvdnav.c @ 82:033f011d8152 src
Improve some debug messages.
Add some comments about dvdnav_open memory leaks.
author | jcdutton |
---|---|
date | Sat, 31 Aug 2002 02:50:27 +0000 |
parents | 0e2abe7083de |
children | ba1121a07120 |
line wrap: on
line diff
--- a/dvdnav.c Thu Aug 29 11:53:25 2002 +0000 +++ b/dvdnav.c Sat Aug 31 02:50:27 2002 +0000 @@ -177,11 +177,17 @@ dvdnav_t *this; /* Create a new structure */ + fprintf(MSG_OUT, "libdvdnav: Using dvdnav version from http://dvd.sf.net\n"); + + /* FIXME: We malloc() here, but if an error occurs inside dvdnav_open(), + * we return but never free() it. + */ (*dest) = NULL; this = (dvdnav_t*)malloc(sizeof(dvdnav_t)); if(!this) return S_ERR; memset(this, 0, (sizeof(dvdnav_t) ) ); /* Make sure this structure is clean */ + (*dest) = this; pthread_mutex_init(&this->vm_lock, NULL); /* Initialise the error string */ @@ -208,16 +214,9 @@ if (this->file) DVDCloseFile(this->file); this->file = NULL; - //if(!this->started) { - // /* Start the VM */ - // vm_start(this->vm); - // this->started = 1; - //} - /* Start the read-ahead cache. */ this->cache = dvdnav_read_cache_new(this); - (*dest) = this; return S_OK; } @@ -288,14 +287,6 @@ #endif result=dvdnav_clear(this); #ifdef LOG_DEBUG - fprintf(MSG_OUT, "libdvdnav: starting vm\n"); -#endif -// if(!this->started) { -// /* Start the VM */ -// vm_start(this->vm); -// this->started = 1; -// } -#ifdef LOG_DEBUG fprintf(MSG_OUT, "libdvdnav: unlocking\n"); #endif pthread_mutex_unlock(&this->vm_lock); @@ -999,6 +990,10 @@ /* * $Log$ + * Revision 1.32 2002/08/31 02:50:27 jcdutton + * Improve some debug messages. + * Add some comments about dvdnav_open memory leaks. + * * Revision 1.31 2002/08/27 19:15:08 mroi * more consistent console output *