obs-qsv11: Protect context variable in clear_data

This commit is contained in:
Richard Stanway 2018-08-11 02:55:43 +02:00
parent 8fdbf60228
commit 144d23a9cc
No known key found for this signature in database
GPG Key ID: AAC1E5265D71B3FD

View File

@ -118,12 +118,12 @@ static void clear_data(struct obs_qsv *obsqsv)
if (obsqsv->context) {
EnterCriticalSection(&g_QsvCs);
qsv_encoder_close(obsqsv->context);
obsqsv->context = NULL;
LeaveCriticalSection(&g_QsvCs);
// bfree(obsqsv->sei);
bfree(obsqsv->extra_data);
obsqsv->context = NULL;
// obsqsv->sei = NULL;
obsqsv->extra_data = NULL;
}