diff --git a/src/output/output_hls.cpp b/src/output/output_hls.cpp index af453b4c..055f209f 100644 --- a/src/output/output_hls.cpp +++ b/src/output/output_hls.cpp @@ -120,16 +120,15 @@ namespace Mist { if ( !myMeta.tracks.size()){ return 1; } - //loop trough all the tracks - for (std::map::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++){ - //return "too late" if one track is past this point - if (ms < it->second.firstms){ - return -1; - } - //return "too early" if one track is not yet at this point - if (ms > it->second.lastms){ - return 1; - } + //check main track + DTSC::Track & mainTrack = myMeta.tracks[*selectedTracks.begin()]; + //return "too late" if one track is past this point + if (ms < mainTrack.firstms){ + return -1; + } + //return "too early" if one track is not yet at this point + if (ms > mainTrack.lastms){ + return 1; } return 0; }