Commit 964c47cf authored by François Grisez's avatar François Grisez

Prevent VideoToolbox decoder from crach when it is uninitialized whereas no...

Prevent VideoToolbox decoder from crach when it is uninitialized whereas no context has been created
parent 1d9a48ba
......@@ -582,8 +582,8 @@ static bool_t h264_dec_init_decoder(VTH264DecCtx *ctx) {
static void h264_dec_uninit_decoder(VTH264DecCtx *ctx) {
ms_message("VideoToolboxDecoder: uninitializing decoder");
VTDecompressionSessionInvalidate(ctx->session);
CFRelease(ctx->session);
CFRelease(ctx->format_desc);
if(ctx->session) CFRelease(ctx->session);
if(ctx->format_desc) CFRelease(ctx->format_desc);
ctx->session = NULL;
ctx->format_desc = NULL;
}
......
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