diff options
author | waker <wakeroid@gmail.com> | 2012-05-17 23:12:00 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-05-17 23:12:00 +0200 |
commit | 6b97a160c2db19b808cbfc320a8a92da203d49ca (patch) | |
tree | 2c3d6594d65d0196c876719120da0d3908c9cbd2 /streamer.c | |
parent | 816d87e1d38dc0fecbe1fa47794b2d7a18d2e321 (diff) |
fixed remaining pl_find_meta calls lacking pl_lock
Diffstat (limited to 'streamer.c')
-rw-r--r-- | streamer.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |