obs-ffmpeg: Encoder timeout hybridmp4 dataloss #11597
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request refines the error-handling logic in signal_failure() within obs-ffmpeg-mux.c. The updates ensure that after an encoder timeout or other muxing-related failures occur, the function now properly resets internal state variables and concludes the data capture session. This change addresses scenarios where subsequent recordings could fail silently after an encoder timeout, improving the overall reliability of hybrid MP4 muxing.
Motivation and Context
Previously, when an encoder timed out, certain state flags and resources within signal_failure() were not fully reset. As a result, starting a new recording session after a failure could lead to silent hangs and zero-byte files, forcing users to restart OBS. By fully cleaning up and ending the data capture process, these issues are prevented, ensuring that subsequent recordings can start without residual state causing problems.
In response to following issue: #11329
How Has This Been Tested?
Test PC:
OS: Windows 10 Pro 22H2
CPU: AMD Ryzen 7 5800x3d
GPU: NVIDIA GeForce RTX 4070 Super
RAM: 32 GB 3600 MHZ
Steps taken:
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: