1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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>
This commit is contained in:
Michael Niedermayer 2016-06-02 13:30:12 +02:00
parent 1b05521bb7
commit 4865252c08

View File

@ -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;
}
}