diff src/recpt1.c @ 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 4f3640bf350d
children 03ab3ade9fe5
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)