diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-06-02 13:30:12 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-06-02 13:41:04 +0200 |
commit | 4865252c0817d541a98aa9c9df05161887cbdeca (patch) | |
tree | 9a7fe7b9e20563540294b512445c63650ce89129 /libavformat/udp.c | |
parent | 1b05521bb72949cf9898ff56c2a7e05f5e74fc83 (diff) | |
download | ffmpeg-4865252c0817d541a98aa9c9df05161887cbdeca.tar.gz |
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.c | 2 |
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; } } |