libobs: Fix lockup when an encode call fails
(This commit also modifies the UI, obs-ffmpeg, and obs-output modules) Fixes a long-time regression where the program would lock up if an encode call fails. Shuts down all outputs associated with the failing encoder and displays an error message to the user. Ideally, it would be best if a more detailed error could be displayed to the user about the nature of the error, though the primary problem is the encoder errors are typically not something the user would be able to understand. The current message is a bit of a generic error message; improvement is welcome. Another suggestion is to try to have the encoder restart seamlessly, though it would take a significant amount of work to be able to make it do something like that properly, and it sort of assumes that encoder failures are sporadic, which may not necessarily be the case with some hardware encoders on some systems. It may be better just to use another encoder in that case. For now, seamless restart is ruled out.
This commit is contained in:
@@ -137,7 +137,10 @@ Output Definition Structure (obs_output_info)
|
||||
Only applies to outputs that are encoded. Packets will always be
|
||||
given in monotonic timestamp order.
|
||||
|
||||
:param packet: The video or audio packet
|
||||
:param packet: The video or audio packet. If NULL, an encoder error
|
||||
occurred, and the output should call
|
||||
:c:func:`obs_output_signal_stop()` with the error code
|
||||
**OBS_OUTPUT_ENCODE_ERROR**.
|
||||
|
||||
.. member:: void (*obs_output_info.update)(void *data, obs_data_t *settings)
|
||||
|
||||
@@ -252,6 +255,7 @@ Output Signals
|
||||
| OBS_OUTPUT_DISCONNECTED - Unexpectedly disconnected
|
||||
| OBS_OUTPUT_UNSUPPORTED - The settings, video/audio format, or codecs are unsupported by this output
|
||||
| OBS_OUTPUT_NO_SPACE - Ran out of disk space
|
||||
| OBS_OUTPUT_ENCODE_ERROR - Encoder error
|
||||
|
||||
**starting** (ptr output)
|
||||
|
||||
|
Reference in New Issue
Block a user