diff options
Diffstat (limited to 'rotord/src/libavwrapper.h')
| -rw-r--r-- | rotord/src/libavwrapper.h | 10 |
1 files changed, 9 insertions, 1 deletions
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); |
