changeset 172:89e24a1c8a64

Fix problem: If boot argument channel had selected by DLNA. Stream will interrupted.
author Naoya OYAMA <naoya.oyama@gmail.com>
date Mon, 29 Oct 2012 22:25:59 +0900
parents 6c710e5a28b8
children 03ab3ade9fe5
files src/recpt1.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/recpt1.c	Tue Oct 23 20:31:01 2012 +0900
+++ b/src/recpt1.c	Mon Oct 29 22:25:59 2012 +0900
@@ -156,6 +156,7 @@
     splitter *splitter   = tdata->splitter;
     boolean use_splitter = splitter ? TRUE : FALSE;
     boolean use_dlna     = tdata->streamer ? TRUE : FALSE;
+    boolean stop_rec     = FALSE;
     ISDB_T_FREQ_CONV_TABLE *table = NULL;
 
     while(1) {
@@ -189,6 +190,7 @@
 
             /* stop stream */
             ioctl(tdata->tfd, STOP_REC, 0);
+            stop_rec = TRUE;
 
             /* wait for remainder */
             while(tdata->queue->num_used > 0) {
@@ -234,7 +236,7 @@
             pthread_mutex_unlock(&tdata->splitter_mutex);
         }
 
-        if (strcmp(tdata->ch, channel)) {
+        if (stop_rec) {
             if (tdata->table->type != current_type) {
             /* re-open device */
                 if(close_tuner(tdata) != 0)