Support re-selecting tracks in all TS-based outputs

This commit is contained in:
Thulinma 2023-03-30 12:25:13 +02:00
parent 696e04d6a0
commit b4b14439d7

View file

@ -61,6 +61,15 @@ namespace Mist{
}
void TSOutput::sendNext(){
static uint64_t lastMeta = 0;
if (Util::epoch() > lastMeta + 5){
lastMeta = Util::epoch();
if (selectDefaultTracks()){
INFO_MSG("Track selection changed - resending headers and continuing");
packCounter = 0;
return;
}
}
// Get ready some data to speed up accesses
std::string type = M.getType(thisIdx);
std::string codec = M.getCodec(thisIdx);