Fix source and sink refcounting.

This commit is contained in:
Peter Johnson
2016-10-26 23:34:44 -07:00
parent 5f69cb2a5b
commit 9a44a38141

View File

@@ -317,7 +317,7 @@ void ReleaseSource(CS_Source source, CS_Status* status) {
*status = CS_INVALID_HANDLE;
return;
}
if (--(data->refCount) == 0) inst.Free(source);
if (data->refCount-- == 0) inst.Free(source);
}
//
@@ -430,7 +430,7 @@ void ReleaseSink(CS_Sink sink, CS_Status* status) {
*status = CS_INVALID_HANDLE;
return;
}
if (--(data->refCount) == 0) inst.Free(sink);
if (data->refCount-- == 0) inst.Free(sink);
}
//