From 32142dac090406b887016348d55adae2c39814c2 Mon Sep 17 00:00:00 2001 From: giongto35 Date: Tue, 14 May 2019 03:04:57 +0800 Subject: [PATCH] Update encoder close --- vpx-encoder/encoder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vpx-encoder/encoder.go b/vpx-encoder/encoder.go index 4cc07998..1c66f22a 100644 --- a/vpx-encoder/encoder.go +++ b/vpx-encoder/encoder.go @@ -176,11 +176,11 @@ func (v *VpxEncoder) Release() { log.Println("Close output", v.Output) C.vpx_img_free(&v.vpxImage) C.vpx_codec_destroy(&v.vpxCodexCtx) - // TODO: Check here, after close it will signal + // TODO: Bug here, after close it will signal + close(v.Output) if v.Input != nil { close(v.Input) } - close(v.Output) } v.IsRunning = false // TODO: Can we merge IsRunning and Done together