From 4daa5c7aa7ee051fc844d2d9b5d0bf633cd5798b Mon Sep 17 00:00:00 2001 From: Palana Date: Mon, 11 May 2015 20:29:32 +0200 Subject: [PATCH] media-io: Fix check before passing pointer to av_freep Found by clang-3.7 (trunk 236075) via -Wpointer-bool-conversion: warning: address of array 'rs->output_buffer' will always evaluate to 'true' --- libobs/media-io/audio-resampler-ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/media-io/audio-resampler-ffmpeg.c b/libobs/media-io/audio-resampler-ffmpeg.c index a4fe92794..cd27a886f 100644 --- a/libobs/media-io/audio-resampler-ffmpeg.c +++ b/libobs/media-io/audio-resampler-ffmpeg.c @@ -121,7 +121,7 @@ void audio_resampler_destroy(audio_resampler_t *rs) if (rs) { if (rs->context) swr_free(&rs->context); - if (rs->output_buffer) + if (rs->output_buffer[0]) av_freep(&rs->output_buffer[0]); bfree(rs);