]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tsfix, htsp: wait only for first video stream
authorJaroslav Kysela <perex@perex.cz>
Mon, 8 Dec 2014 14:51:05 +0000 (15:51 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 8 Dec 2014 14:51:05 +0000 (15:51 +0100)
src/htsp_server.c
src/plumbing/tsfix.c

index 29d7ae6c5fb0941cb663a2d6d320fa74ebf2cf18..69558f73a5da1ce1282eb161f9612844b53a49ac 100644 (file)
@@ -3056,6 +3056,7 @@ htsp_subscription_start(htsp_subscription_t *hs, const streaming_start_t *ss)
         hs->hs_wait_for_video = 1;
         return;
       }
+      break;
     }
   }
   hs->hs_wait_for_video = 0;
index 67d4262be8c8c476cf47e470dabf3bbe3bf56401..c270e04bf31465aeb220ef588ff494b081fd5479 100644 (file)
@@ -144,9 +144,10 @@ tsfix_start(tsfix_t *tf, streaming_start_t *ss)
     const streaming_start_component_t *ssc = &ss->ss_components[i];
     tsfix_add_stream(tf, ssc->ssc_index, ssc->ssc_type);
     if (SCT_ISVIDEO(ssc->ssc_type)) {
-      hasvideo = 1;
       if (ssc->ssc_width == 0 || ssc->ssc_height == 0)
-        vwait = 1;
+        /* only first video stream may be valid */
+        vwait = !hasvideo ? 1 : 0;
+      hasvideo = 1;
     }
   }