Explorar o código

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'
Palana %!s(int64=10) %!d(string=hai) anos
pai
achega
4daa5c7aa7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      libobs/media-io/audio-resampler-ffmpeg.c

+ 1 - 1
libobs/media-io/audio-resampler-ffmpeg.c

@@ -121,7 +121,7 @@ void audio_resampler_destroy(audio_resampler_t *rs)
 	if (rs) {
 	if (rs) {
 		if (rs->context)
 		if (rs->context)
 			swr_free(&rs->context);
 			swr_free(&rs->context);
-		if (rs->output_buffer)
+		if (rs->output_buffer[0])
 			av_freep(&rs->output_buffer[0]);
 			av_freep(&rs->output_buffer[0]);
 
 
 		bfree(rs);
 		bfree(rs);