obs-outputs: Don't allow new data if disconnected

master
jp9000 2015-11-18 10:30:26 -08:00
parent 6a27da9bd7
commit f05f0592e0
1 changed files with 5 additions and 3 deletions

View File

@ -833,9 +833,11 @@ static void rtmp_stream_data(void *data, struct encoder_packet *packet)
pthread_mutex_lock(&stream->packets_mutex); pthread_mutex_lock(&stream->packets_mutex);
added_packet = (packet->type == OBS_ENCODER_VIDEO) ? if (!disconnected(stream)) {
add_video_packet(stream, &new_packet) : added_packet = (packet->type == OBS_ENCODER_VIDEO) ?
add_packet(stream, &new_packet); add_video_packet(stream, &new_packet) :
add_packet(stream, &new_packet);
}
pthread_mutex_unlock(&stream->packets_mutex); pthread_mutex_unlock(&stream->packets_mutex);