From 959b4591baa048b692e38c39c8db89317023ccea Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Tue, 10 Sep 2013 12:56:08 +0100 Subject: cvimage release --- rotord/src/libavwrapper.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'rotord/src/libavwrapper.h') diff --git a/rotord/src/libavwrapper.h b/rotord/src/libavwrapper.h index 7f3d549..ed538d2 100644 --- a/rotord/src/libavwrapper.h +++ b/rotord/src/libavwrapper.h @@ -190,7 +190,15 @@ namespace libav { class exporter { public: - virtual ~exporter(){}; + exporter(){ + sws_ctx = NULL; + } + virtual ~exporter(){ + if (NULL != sws_ctx) { + sws_freeContext(sws_ctx); + sws_ctx = NULL; + } + }; bool setup(int w,int h, int bitRate, int frameRate, std::string container); bool record(std::string filename); bool encodeFrame(unsigned char *pixels, uint16_t *samples); -- cgit v1.2.3