Skip to content

Commit

Permalink
Fix crash on multi-thread decoding. (#3736)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tyan0 authored Apr 10, 2024
1 parent f86f0e4 commit 1debdae
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions codec/decoder/core/src/decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,6 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in
if (pCtx->bAuReadyFlag && pCtx->pAccessUnitList->uiAvailUnitsNum != 0) {
if (GetThreadCount (pCtx) <= 1) {
ConstructAccessUnit (pCtx, ppDst, pDstBufInfo);
} else {
pCtx->pAccessUnitList->uiAvailUnitsNum = 1;
}
}
}
Expand Down Expand Up @@ -884,8 +882,6 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in
if (pCtx->bAuReadyFlag && pCtx->pAccessUnitList->uiAvailUnitsNum != 0) {
if (GetThreadCount (pCtx) <= 1) {
ConstructAccessUnit (pCtx, ppDst, pDstBufInfo);
} else {
pCtx->pAccessUnitList->uiAvailUnitsNum = 1;
}
}
}
Expand Down

0 comments on commit 1debdae

Please sign in to comment.