]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
DVR: replace dvr_thread_backlog_free with streaming_queue_clear - identical
authorJaroslav Kysela <perex@perex.cz>
Mon, 23 Nov 2015 17:16:27 +0000 (18:16 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 23 Nov 2015 17:16:27 +0000 (18:16 +0100)
src/dvr/dvr_rec.c

index 250fb8f2b720d2d2a2d931841508aa89a8af471d..529d3b56d0804cb337474f1cb24371697bd43b81 100644 (file)
@@ -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);
-  }
-}
-
 /**
  *
  */
@@ -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 {
@@ -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;
@@ -1454,7 +1441,7 @@ fin:
   }
   pthread_mutex_unlock(&sq->sq_mutex);
 
-  dvr_thread_backlog_free(&backlog);
+  streaming_queue_clear(&backlog);
 
   if (prch->prch_muxer)
     dvr_thread_epilog(de, postproc);