summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/Makefile.am2
-rw-r--r--src/xine-engine/configfile.c4
-rw-r--r--src/xine-engine/events.c1
-rw-r--r--src/xine-engine/info_helper.c5
-rw-r--r--src/xine-engine/xine.c8
5 files changed, 12 insertions, 8 deletions
diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am
index 64ba68a97..15553380a 100644
--- a/src/xine-engine/Makefile.am
+++ b/src/xine-engine/Makefile.am
@@ -12,7 +12,7 @@ EXTRA_DIST = lrb.c lrb.h accel_vdpau.h accel_xvmc.h
if WIN32
DEF_FILE = libxine-$(XINE_MAJOR).def
-def_ldflags="-Wl,--output-def,$(DEF_FILE)"
+def_ldflags=-Wl,--output-def,$(DEF_FILE) $(LDFLAGS_NOUNDEFINED)
else
DEF_FILE =
endif
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index e5c42f6ea..b82db8b77 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.c
@@ -1026,8 +1026,8 @@ void xine_config_save (xine_t *xine, const char *filename) {
lprintf("backing up configfile to %s\n", temp);
- f_backup = fopen(temp, "w");
- f_config = fopen(filename, "r");
+ f_backup = fopen(temp, "wb");
+ f_config = fopen(filename, "rb");
if (f_config && f_backup && (stat(filename, &config_stat) == 0)) {
char *buf = NULL;
diff --git a/src/xine-engine/events.c b/src/xine-engine/events.c
index 33d9988be..11d6e8bd7 100644
--- a/src/xine-engine/events.c
+++ b/src/xine-engine/events.c
@@ -193,6 +193,7 @@ void xine_event_dispose_queue (xine_event_queue_t *queue) {
while ( (event = xine_event_get (queue)) ) {
xine_event_free (event);
}
+ xine_list_delete(queue->events);
pthread_mutex_destroy(&queue->lock);
pthread_cond_destroy(&queue->new_event);
diff --git a/src/xine-engine/info_helper.c b/src/xine-engine/info_helper.c
index 93fc2173d..85f43b357 100644
--- a/src/xine-engine/info_helper.c
+++ b/src/xine-engine/info_helper.c
@@ -241,9 +241,6 @@ static void meta_info_set_unlocked_encoding(xine_stream_t *stream, int info, con
xprintf(stream->xine, XINE_VERBOSITY_LOG,
_("info_helper: unsupported conversion %s -> UTF-8, no conversion performed\n"), enc);
- if (system_enc)
- free(system_enc);
-
if (cd != (iconv_t)-1) {
char *utf8_value;
ICONV_CONST char *inbuf;
@@ -273,6 +270,8 @@ static void meta_info_set_unlocked_encoding(xine_stream_t *stream, int info, con
return;
}
}
+
+ free(system_enc);
}
#endif
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index c2e6641ec..a03ac5686 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -696,6 +696,7 @@ xine_stream_t *xine_stream_new (xine_t *this,
pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init (&stream->frontend_lock, &attr);
+ pthread_mutexattr_destroy(&attr);
/*
* Clear meta/stream info
@@ -1534,6 +1535,8 @@ static void xine_dispose_internal (xine_stream_t *stream) {
stream->metronom->exit (stream->metronom);
+ xine_list_delete(stream->event_queues);
+
pthread_mutex_lock(&stream->xine->streams_lock);
ite = xine_list_find(stream->xine->streams, stream);
if (ite) {
@@ -1578,7 +1581,6 @@ void xine_dispose (xine_stream_t *stream) {
if (stream->osd_renderer)
stream->osd_renderer->close( stream->osd_renderer );
-
_x_refcounter_dec(stream->refcounter);
}
@@ -1607,6 +1609,8 @@ void xine_exit (xine_t *this) {
if(this->port_ticket)
this->port_ticket->dispose(this->port_ticket);
+ pthread_mutex_destroy(&this->log_lock);
+
#if defined(WIN32)
WSACleanup();
#endif
@@ -1652,6 +1656,7 @@ xine_t *xine_new (void) {
* log buffers
*/
memset(this->log_buffers, 0, sizeof(this->log_buffers));
+ pthread_mutex_init (&this->log_lock, NULL);
#ifdef WIN32
@@ -1747,7 +1752,6 @@ void xine_init (xine_t *this) {
* locks
*/
pthread_mutex_init (&this->streams_lock, NULL);
- pthread_mutex_init (&this->log_lock, NULL);
/* initialize color conversion tables and functions */
init_yuv_conversion();