close stream after error

This commit is contained in:
c0ntrol
2019-05-29 15:05:21 +02:00
parent 426f35df49
commit 8335b33fd0

View File

@@ -85,9 +85,16 @@ static int eval_state(threaded_t *t, vj_tag *tag)
lock(t);
if(t->state == STATE_ERROR || t->v == NULL) {
if(t->v != NULL ) { // close stream on error
vj_client_close(t->v);
vj_client_free(t->v);
t->v = NULL;
}
if(t->v == NULL) {
t->v = vj_client_alloc_stream(t->info);
}
veejay_msg(VEEJAY_MSG_INFO, " ... Waiting for network stream to become ready [%s]",tag->source_name);
int success = vj_client_connect_dat( t->v, tag->source_name,tag->video_channel );
if(success <= 0) {