Commit 28bde843 authored by Andreas Traczyk's avatar Andreas Traczyk

media encoder: fix avcodec_free_context crash(native windows build)

Change-Id: I4ca49c6dc3feb55441079c1c2ad3d71d84c360ef
parent 9f3931cd
......@@ -54,7 +54,13 @@ MediaEncoder::~MediaEncoder()
av_write_trailer(outputCtx_);
for (auto encoderCtx : encoders_)
avcodec_free_context(&encoderCtx);
if (encoderCtx) {
#ifndef _MSC_VER
avcodec_free_context(&encoderCtx);
#else
avcodec_close(encoderCtx);
#endif
}
avformat_free_context(outputCtx_);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment