[vlc-commits] streamfilter/httplive.c: UpdatePlaylist() actually lock segment when updating it.
Jean-Paul Saman
git at videolan.org
Tue Jan 24 19:31:53 CET 2012
vlc/vlc-1.2 | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Tue Jan 10 12:14:00 2012 +0100| [1e39f64cbc1f4be87c2fd35fabf25630e525a987] | committer: Jean-Baptiste Kempf
streamfilter/httplive.c: UpdatePlaylist() actually lock segment when updating it.
When an already existing segment is updated, then make sure it to take the lock.
(cherry picked from commit 2ada723d2ad9682c7532690462ca4791b3290899)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=1e39f64cbc1f4be87c2fd35fabf25630e525a987
---
modules/stream_filter/httplive.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index fb7ca70..d17f061 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1065,6 +1065,8 @@ static int hls_UpdatePlaylist(stream_t *s, hls_stream_t *hls_new, hls_stream_t *
assert(p->url.psz_path);
assert(segment->url.psz_path);
+ vlc_mutex_lock(&segment->lock);
+
/* they should be the same */
if ((p->sequence != segment->sequence) ||
(p->duration != segment->duration) ||
@@ -1091,6 +1093,8 @@ static int hls_UpdatePlaylist(stream_t *s, hls_stream_t *hls_new, hls_stream_t *
segment_Free(p);
free(psz_url);
}
+
+ vlc_mutex_unlock(&segment->lock);
}
else
{
More information about the vlc-commits
mailing list