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

udp: check ff_socket_nonblock() return code

Fixes CID733719
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-05 21:21:04 +01:00
parent 30d27685b1
commit 282a6308bf

View File

@ -442,8 +442,12 @@ static void *circular_buffer_task( void *_URLContext)
int old_cancelstate; int old_cancelstate;
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancelstate); pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancelstate);
ff_socket_nonblock(s->udp_fd, 0);
pthread_mutex_lock(&s->mutex); pthread_mutex_lock(&s->mutex);
if (ff_socket_nonblock(s->udp_fd, 0) < 0) {
av_log(h, AV_LOG_ERROR, "Failed to set blocking mode");
s->circular_buffer_error = AVERROR(EIO);
goto end;
}
while(1) { while(1) {
int len; int len;