drop stream on error

This commit is contained in:
Devaev Maxim
2018-09-20 21:48:01 +03:00
parent 2b1afb8958
commit c9c843d236
2 changed files with 11 additions and 5 deletions

View File

@@ -250,7 +250,10 @@ void stream_loop(struct stream_t *stream) {
A_PTHREAD_M_LOCK(&stream->mutex);
stream->picture.size = 0;
free(stream->picture.data);
stream->width = 0;
stream->height = 0;
stream->online = false;
stream->updated = true;
A_PTHREAD_M_UNLOCK(&stream->mutex);
}