From 1d6e618939c1ba9c333d513fc7826719dae34031 Mon Sep 17 00:00:00 2001 From: Matt Wolenetz Date: Wed, 27 Mar 2013 17:29:57 -0700 Subject: [PATCH] vp8: Fix pthread_cond and pthread_mutex leaks CC: libav-stable@libav.org Signed-off-by: Luca Barbato --- libavcodec/vp8.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index babbff4901..068764827b 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -40,6 +40,10 @@ static void free_buffers(VP8Context *s) int i; if (s->thread_data) for (i = 0; i < MAX_THREADS; i++) { +#if HAVE_THREADS + pthread_cond_destroy(&s->thread_data[i].cond); + pthread_mutex_destroy(&s->thread_data[i].lock); +#endif av_freep(&s->thread_data[i].filter_strength); av_freep(&s->thread_data[i].edge_emu_buffer); }