qtmux: Select the best pad based on the cached last_buf if any
last_buf is the one we're going to write next, not buf. As such we should check timestamps against that one if there is one to select the earliest pad. Also remember the currently selected pad in the very beginning when storing the first last_buf. This both solves some edge cases where not the correct next pad was selected corresponding to the target interleave.
Showing with 5 additions and 1 deletion