From 0e8647a534cd493f5b0cfe37fa151cce622143e9 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 8 Dec 2014 15:51:05 +0100 Subject: [PATCH] tsfix, htsp: wait only for first video stream --- src/htsp_server.c | 1 + src/plumbing/tsfix.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/htsp_server.c b/src/htsp_server.c index 29d7ae6c..69558f73 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -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; diff --git a/src/plumbing/tsfix.c b/src/plumbing/tsfix.c index 67d4262b..c270e04b 100644 --- a/src/plumbing/tsfix.c +++ b/src/plumbing/tsfix.c @@ -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; } }