summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-06-02 13:30:12 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-06-02 13:41:04 +0200
commit4865252c0817d541a98aa9c9df05161887cbdeca (patch)
tree9a7fe7b9e20563540294b512445c63650ce89129 /libavformat/udp.c
parent1b05521bb72949cf9898ff56c2a7e05f5e74fc83 (diff)
avformat/udp: Protect write to circular_buffer_error by mutex
This isnt really needed on most platforms but fixes CID1362183 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r--libavformat/udp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 9499a72e27..0f35689271 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -605,7 +605,9 @@ static void *circular_buffer_task_tx( void *_URLContext)
} else {
ret = ff_neterrno();
if (ret != AVERROR(EAGAIN) && ret != AVERROR(EINTR)) {
+ pthread_mutex_lock(&s->mutex);
s->circular_buffer_error = ret;
+ pthread_mutex_unlock(&s->mutex);
return NULL;
}
}