Skip to content
This repository was archived by the owner on Oct 31, 2022. It is now read-only.

Commit 0305aed

Browse files
committed
Trivial: pass NULL not previously-used reference for multi-threaded decode callback
1 parent 5d54afb commit 0305aed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/HapDecompressor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ pascal ComponentResult Hap_DDecodeBand(HapDecompressorGlobals glob, ImageSubCode
513513

514514
if (!isDXTPixelFormat(myDrp->destFormat))
515515
{
516-
unsigned int hapResult = HapDecode(drp->codecData, myDrp->dataSize, (HapDecodeCallback)HapMTDecode, glob, HapCodecBufferGetBaseAddress(myDrp->dxtBuffer), HapCodecBufferGetSize(myDrp->dxtBuffer), NULL, &myDrp->texFormat);
516+
unsigned int hapResult = HapDecode(drp->codecData, myDrp->dataSize, (HapDecodeCallback)HapMTDecode, NULL, HapCodecBufferGetBaseAddress(myDrp->dxtBuffer), HapCodecBufferGetSize(myDrp->dxtBuffer), NULL, &myDrp->texFormat);
517517
if (hapResult != HapResult_No_Error)
518518
{
519519
err = (hapResult == HapResult_Bad_Frame ? codecBadDataErr : internalComponentErr);
@@ -569,7 +569,7 @@ pascal ComponentResult Hap_DDrawBand(HapDecompressorGlobals glob, ImageSubCodecD
569569
// get asked for the wrong one here
570570

571571
unsigned int bufferSize = dxtBytesForDimensions(myDrp->dxtWidth, myDrp->dxtHeight, glob->type);
572-
unsigned int hapResult = HapDecode(drp->codecData, myDrp->dataSize, (HapDecodeCallback)HapMTDecode, glob, drp->baseAddr, bufferSize, NULL, &myDrp->texFormat);
572+
unsigned int hapResult = HapDecode(drp->codecData, myDrp->dataSize, (HapDecodeCallback)HapMTDecode, NULL, drp->baseAddr, bufferSize, NULL, &myDrp->texFormat);
573573
if (hapResult != HapResult_No_Error)
574574
{
575575
err = (hapResult == HapResult_Bad_Frame ? codecBadDataErr : internalComponentErr);

0 commit comments

Comments
 (0)