<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>matroska_segment_c::ComputeTrackPriority already has the loops and boolean to tell you if the file has audio, video plus knowledge of possibly disabled tracks. I’d rather see that inside this function than here.</p>
</blockquote>
<p>Fixed, see the attached patch!</p>