Skip to content

Commit 1debdae

Browse files
authored
Fix crash on multi-thread decoding. (#3736)
When decoding: https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov in multi-threads, openh264 crashes with segfault. This patch fixes the issue.
1 parent f86f0e4 commit 1debdae

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

codec/decoder/core/src/decoder.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,6 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in
820820
if (pCtx->bAuReadyFlag && pCtx->pAccessUnitList->uiAvailUnitsNum != 0) {
821821
if (GetThreadCount (pCtx) <= 1) {
822822
ConstructAccessUnit (pCtx, ppDst, pDstBufInfo);
823-
} else {
824-
pCtx->pAccessUnitList->uiAvailUnitsNum = 1;
825823
}
826824
}
827825
}
@@ -884,8 +882,6 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in
884882
if (pCtx->bAuReadyFlag && pCtx->pAccessUnitList->uiAvailUnitsNum != 0) {
885883
if (GetThreadCount (pCtx) <= 1) {
886884
ConstructAccessUnit (pCtx, ppDst, pDstBufInfo);
887-
} else {
888-
pCtx->pAccessUnitList->uiAvailUnitsNum = 1;
889885
}
890886
}
891887
}

0 commit comments

Comments
 (0)