summaryrefslogtreecommitdiff
path: root/streamer.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-05-17 23:12:00 +0200
committerGravatar waker <wakeroid@gmail.com>2012-05-17 23:12:00 +0200
commit6b97a160c2db19b808cbfc320a8a92da203d49ca (patch)
tree2c3d6594d65d0196c876719120da0d3908c9cbd2 /streamer.c
parent816d87e1d38dc0fecbe1fa47794b2d7a18d2e321 (diff)
fixed remaining pl_find_meta calls lacking pl_lock
Diffstat (limited to 'streamer.c')
-rw-r--r--streamer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/streamer.c b/streamer.c
index 53993d9c..80343639 100644
--- a/streamer.c
+++ b/streamer.c
@@ -708,7 +708,9 @@ streamer_set_current (playItem_t *it) {
// try to get content-type
mutex_lock (decodemutex);
trace ("\033[0;34mopening file %s\033[37;0m\n", pl_find_meta (it, ":URI"));
+ pl_lock ();
DB_FILE *fp = streamer_file = vfs_fopen (pl_find_meta (it, ":URI"));
+ pl_unlock ();
mutex_unlock (decodemutex);
const char *plug = NULL;
trace ("\033[0;34mgetting content-type\033[37;0m\n");
@@ -877,6 +879,7 @@ m3u_error:
dec = plug_get_decoder_for_id (decoder_id);
if (!dec) {
// find new decoder by file extension
+ pl_lock ();
const char *fname = pl_find_meta (it, ":URI");
const char *ext = strrchr (fname, '.');
if (ext) {
@@ -897,6 +900,7 @@ m3u_error:
}
}
}
+ pl_unlock ();
}
if (dec) {
trace ("\033[0;33minit decoder for %s (%s)\033[37;0m\n", pl_find_meta (it, ":URI"), decoder_id);