summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-20 23:31:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-20 23:31:32 +0200
commit044c0e62eaea07c2649d821dadd4d875d3fb9ec7 (patch)
treec3fc29299758b6af2711420052eb614fa9132596 /libavformat/udp.c
parentc4503a2e4010d2f0832a758aa6c8079fcf4bfac7 (diff)
udp: add missing mutex unlock
Fixes CID703688 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r--libavformat/udp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 433f961814..c6f0a1fd71 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -766,8 +766,10 @@ static int udp_read(URLContext *h, uint8_t *buf, int size)
int64_t t = av_gettime() + 100000;
struct timespec tv = { .tv_sec = t / 1000000,
.tv_nsec = (t % 1000000) * 1000 };
- if (pthread_cond_timedwait(&s->cond, &s->mutex, &tv) < 0)
+ if (pthread_cond_timedwait(&s->cond, &s->mutex, &tv) < 0) {
+ pthread_mutex_unlock(&s->mutex);
return AVERROR(errno == ETIMEDOUT ? EAGAIN : errno);
+ }
nonblock = 1;
}
} while( 1);