diff options
author | anonymous <anonymous> | 2012-08-06 09:56:50 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-08-06 10:06:26 +0200 |
commit | 388243bb27f3d9b8f50d54268a784d55a7171f10 (patch) | |
tree | 98c3282bb4432aeb7ec720e1800b3c78ad91fba8 /libavformat/udp.c | |
parent | e6b9903d8275d29569aef41f6848800b9af8eccf (diff) | |
download | ffmpeg-388243bb27f3d9b8f50d54268a784d55a7171f10.tar.gz |
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.
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r-- | libavformat/udp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c index bd7665ef74..f93c607c35 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -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; |