New upstream version 23.2.1+dfsg1
This commit is contained in:
parent
cdc9a9fc87
commit
b14f9eae6d
1017 changed files with 37232 additions and 11111 deletions
|
|
@ -92,6 +92,7 @@ static void rtmp_stream_destroy(void *data)
|
|||
}
|
||||
}
|
||||
|
||||
RTMP_TLS_Free();
|
||||
free_packets(stream);
|
||||
dstr_free(&stream->path);
|
||||
dstr_free(&stream->key);
|
||||
|
|
@ -486,8 +487,12 @@ static void *send_thread(void *data)
|
|||
}
|
||||
}
|
||||
|
||||
bool encode_error = os_atomic_load_bool(&stream->encode_error);
|
||||
|
||||
if (disconnected(stream)) {
|
||||
info("Disconnected from %s", stream->path.array);
|
||||
} else if (encode_error) {
|
||||
info("Encoder error, disconnecting");
|
||||
} else {
|
||||
info("User stopped the stream");
|
||||
}
|
||||
|
|
@ -506,6 +511,8 @@ static void *send_thread(void *data)
|
|||
if (!stopping(stream)) {
|
||||
pthread_detach(stream->send_thread);
|
||||
obs_output_signal_stop(stream->output, OBS_OUTPUT_DISCONNECTED);
|
||||
} else if (encode_error) {
|
||||
obs_output_signal_stop(stream->output, OBS_OUTPUT_ENCODE_ERROR);
|
||||
} else {
|
||||
obs_output_end_data_capture(stream->output);
|
||||
}
|
||||
|
|
@ -885,6 +892,7 @@ static bool init_connect(struct rtmp_stream *stream)
|
|||
return false;
|
||||
|
||||
os_atomic_set_bool(&stream->disconnected, false);
|
||||
os_atomic_set_bool(&stream->encode_error, false);
|
||||
stream->total_bytes_sent = 0;
|
||||
stream->dropped_frames = 0;
|
||||
stream->min_priority = 0;
|
||||
|
|
@ -1102,6 +1110,13 @@ static void rtmp_stream_data(void *data, struct encoder_packet *packet)
|
|||
if (disconnected(stream) || !active(stream))
|
||||
return;
|
||||
|
||||
/* encoder fail */
|
||||
if (!packet) {
|
||||
os_atomic_set_bool(&stream->encode_error, true);
|
||||
os_sem_post(stream->send_sem);
|
||||
return;
|
||||
}
|
||||
|
||||
if (packet->type == OBS_ENCODER_VIDEO) {
|
||||
if (!stream->got_first_video) {
|
||||
stream->start_dts_offset =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue