Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: replace dvr_thread_backlog_free with streaming_queue_clear - ide…
…ntical
  • Loading branch information
perexg committed Nov 23, 2015
1 parent f803f9d commit 93cd28c
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/dvr/dvr_rec.c
Expand Up @@ -1154,19 +1154,6 @@ dvr_thread_rec_start(dvr_entry_t **_de, streaming_start_t *ss,
return ret;
}

/**
*
*/
static void
dvr_thread_backlog_free(struct streaming_message_queue *backlog)
{
streaming_message_t *sm;
while ((sm = TAILQ_FIRST(backlog)) != NULL) {
TAILQ_REMOVE(backlog, sm, sm_link);
streaming_msg_free(sm);
}
}

/**
*
*/
Expand Down Expand Up @@ -1236,7 +1223,7 @@ dvr_thread(void *aux)
continue;
} else {
if (TAILQ_FIRST(&backlog))
dvr_thread_backlog_free(&backlog);
streaming_queue_clear(&backlog);
epg_running = 1;
}
} else {
Expand Down Expand Up @@ -1388,7 +1375,7 @@ dvr_thread(void *aux)
streaming_code2txt(sm->sm_code));

fin:
dvr_thread_backlog_free(&backlog);
streaming_queue_clear(&backlog);
dvr_thread_epilog(de, postproc);
start_time = 0;
started = 0;
Expand Down Expand Up @@ -1454,7 +1441,7 @@ dvr_thread(void *aux)
}
pthread_mutex_unlock(&sq->sq_mutex);

dvr_thread_backlog_free(&backlog);
streaming_queue_clear(&backlog);

if (prch->prch_muxer)
dvr_thread_epilog(de, postproc);
Expand Down

0 comments on commit 93cd28c

Please sign in to comment.