-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix glitches that sometimes happen near the scene changes. #3707
Conversation
In CWelsDecoder::ReorderPicturesInDisplay(), iLastWrittenPOC was not set in unbuffered-reordering case. Due to this problem, it sometimes reordered the frames incorrectly. This patch fixes the issue.
When bNewSeqBegin got true, iRefCount was forcibly reset even if the buffer was still used for reordering. Due to this problem, the buffer in use was sometimes overwritten with newly decoded frame. This commit is for fixing that problem.
If it is better to provide sample video file with the glitch, I am ready to do that. |
Please reproduce the glitch (2) using the sample video file: The glitch will occur at about 12 sec. point from the begining. |
@tyan0 CI failed. |
Thanks for checking. I have fixed that problem. Could you please rerun CI? |
f82abc0
to
c947a4c
Compare
I revised the pull request several times. Now I am almost sure that this is the final change. Please review. Thanks. |
I found another problem of the current openh264 code regarding scene change.
This causes when multiple scene canges happen in a very short time. I would like to add new commit for that problem. |
Done. Please review. |
Previously, when more than 2 frame sequences exist in the reordering buffer, the reordering does not work correctly. This is because the management based on bLastGOP flag does not work in this case. Instead, this patch introduces frame sequence number (iSeqNum) to distingish frames belonging to each sequence and drops bLastGOP flag.
Fix typo in commit message. |
Thanks for the fix @tyan0 |
Thanks! |
Since the first time I used the openh264 decoder, I have encountered glitches that sometimes happen near the scene changes. I looked into this problem and found two causes.
This issue happens frequently enough to frustrate me. I wonder why the other users have not pointed this problem out till today.
This pull request provides two commits corresponding to each problem.