qtmux: Protect against writing absurd sample durations
authorJan Schmidt <jan@centricular.com>
Thu, 18 Mar 2021 15:51:20 +0000 (02:51 +1100)
committerJan Schmidt <jan@centricular.com>
Mon, 12 Apr 2021 14:18:36 +0000 (00:18 +1000)
commitfae29cb3c21ffe480f110c2f9448a60c871e39fd
tree34711f06344284ec84cfcba166802a96340ee446
parent590fbb4ddddf543ff12cc75ae7201a6485a9899e
qtmux: Protect against writing absurd sample durations

If the input DTS goes backward or is missing, the calculated
sample duration goes negative and wraps around to a very big
number. In that case, just write a sample with a duration of
0 and hope the problem is transient.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/914>
gst/isomp4/gstqtmux.c
gst/isomp4/gstqtmux.h