qtmux: Select the best pad based on the cached last_buf if any
authorSebastian Dröge <sebastian@centricular.com>
Tue, 4 Apr 2017 12:08:33 +0000 (15:08 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 4 Apr 2017 12:24:45 +0000 (15:24 +0300)
commit6b889bea696ccf4f65d3d399c6522f49b3aabe80
tree4705197a910220bb65c96ba453cf30093a110225
parenteb307baff4039884f8cb334c8f935c31bcc8cc2f
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.
gst/isomp4/gstqtmux.c