diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-09-10 12:56:08 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-09-10 12:56:08 +0100 |
| commit | 959b4591baa048b692e38c39c8db89317023ccea (patch) | |
| tree | f819b7b5ecc614bbe5c4e40fd573b33b55fb5edc /rotord/src/libavwrapper.h | |
| parent | 1ba984e17672dd214e4e239c6806ee2e739432e8 (diff) | |
cvimage release
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); |
