bug? can't streaming. if set the RetryDelay to 0.

tristsesame

New Member
about the Reconnect Setting. I found if set the "RetryDelay" value to "0" or "1", even "5".

It possibly happend that you can found reconnecting just try once, and... there is no result about this reconnect event.
you don't know it is sucess of false.

I check the code.

if the output is active,
the reconnecting don't check the start is success.
if active(output) return false, then do nothing.
so actually there is no streaming. but the text on streambutton is "streaming"

you can find click the streambutton, nothing happened.

Is is a bug?
 

Attachments

I just edit the code.
sb can tell me is it right?

obs-output.c

C++:
static void *reconnect_thread(void *param)
{
    struct obs_output *output = param;
    unsigned long ms = output->reconnect_retry_cur_sec * 1000;

    output->reconnect_thread_active = true;

    if (!active(output))
    {
        if (os_event_timedwait(output->reconnect_stop_event, ms) == ETIMEDOUT)
        {
            obs_output_actual_start(output);
        }
    }
    else
    {
        output_reconnect(output);
    }

    if (os_event_try(output->reconnect_stop_event) == EAGAIN)
        pthread_detach(output->reconnect_thread);
    else
        os_atomic_set_bool(&output->reconnecting, false);

    output->reconnect_thread_active = false;
    return NULL;
}
 
found bug!
try edit the code twice.

Code:
    struct obs_output *output = param;
    unsigned long ms = output->reconnect_retry_cur_sec * 1000;

    output->reconnect_thread_active = true;

    if (os_event_timedwait(output->reconnect_stop_event, ms) == ETIMEDOUT)
    {
        if (!obs_output_actual_start(output))
        {
            os_atomic_set_bool(&output->reconnecting, false);
            output_reconnect(output);
        }
    }
 
Back
Top