Commit 388243bb authored by anonymous's avatar anonymous Committed by Clément Bœsch

udp: do not call pthread_{mutex,cond}_destroy when not initialized.

This seems to cause a crash on Windows.

The author of that patch was a random guy on IRC who wants to stay anonymous.
parent e6b9903d
......@@ -786,10 +786,9 @@ static int udp_close(URLContext *h)
ret = pthread_join(s->circular_buffer_thread, NULL);
if (ret != 0)
av_log(h, AV_LOG_ERROR, "pthread_join(): %s\n", strerror(ret));
pthread_mutex_destroy(&s->mutex);
pthread_cond_destroy(&s->cond);
}
pthread_mutex_destroy(&s->mutex);
pthread_cond_destroy(&s->cond);
#endif
av_fifo_free(s->fifo);
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment