Browse Source

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>
tags/n3.1
Michael Niedermayer 9 years ago
parent
commit
4865252c08
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/udp.c

+ 2
- 0
libavformat/udp.c 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;
}
}


Loading…
Cancel
Save