Skip to content
Snippets Groups Projects
Commit 28bde843 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

media encoder: fix avcodec_free_context crash(native windows build)

Change-Id: I4ca49c6dc3feb55441079c1c2ad3d71d84c360ef
parent 9f3931cd
No related branches found
No related tags found
No related merge requests found
......@@ -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_);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment