This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix EB_ENC_PD_ERROR4 EB_ENC_PD_ERROR8 in race conditions
race condition 1 in PA happens in this way: EbGetEmptyObject(queue, &p); EbObjectIncLiveCount(&p, 1); EbReleaseObject(&p) EbObjectIncLiveCount(&p, 1); //bug, increase live count after release EbReleaseObject(&p) //bug, double release fix in this way: EbGetEmptyObject(queue, &p); EbObjectIncLiveCount(&p, 2); //increase by 2 directly EbReleaseObject(&p) EbReleaseObject(&p) race condition 2 in PD and ENC: ENC call EbReleaseObject() before PD call EbObjectIncLiveCount(1) in other words: dependentPicturesCount-- before dependentPicturesCount++, so as that dependentPicturesCount become negative e.g. -1 another race condition: ++/-- is NOT thread safe, dependentPicturesCount ++/-- happen at same time so that this counter cannot go back to zero, leads to the queue entry will never be released, queue full, 0x2103 error fix in this way: first remove the useless pair of EbReleaseObject and EbObjectIncLiveCount and then workaround: force remove the entries that stay in the queue for unreasonable long time even dependentPicturesCount is not reduced to zero Signed-off-by: xiaoxime <xiao.xi.meng@intel.com>
- Loading branch information
1 parent
9e5e7ac
commit b09984c
Showing
5 changed files
with
29 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters