tsfix, htsp: wait only for first video stream

This commit is contained in:
Jaroslav Kysela 2014-12-08 15:51:05 +01:00
parent 8668734eff
commit 0e8647a534
2 changed files with 4 additions and 2 deletions

View 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;

View 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;
}
}