GNOME Bugzilla – Bug 710118
tsdemux: warning/assert due to denominator == zero in mpegts_packetizer_ts_to_offset()
Last modified: 2014-02-20 15:22:53 UTC
I got zero denominator error from gst_util_uint64_scale() when doing some testing. I can not easily reproduce the error and it did seem benign in that video keep playing. Seems like the error message can be prevented by making sure there is no divide by zero. I will attach a patch that makes sure there is not a zero denominator but not sure it is the right way to fix the issue.
Created attachment 257279 [details] [review] Elinimates zero denominator error
Not sure if this is right... AFAIU this happens when there's a PCR rollover, and in that case you probably have to do more than assuming 0 to handle it properly.
There is a (very small) probability that you might end up with firstpcr == lastpcr. This would happen if: * nextgroup == prevgroup * and the group is empty In that case, you can just return firstoffset (which is what you're doing, but in a complicated way and without any explanation).
This is now fixed by this commit. commit c229a87ac3e6bfb767004924b884f63625e4f368 Author: Edward Hervey <edward@collabora.com> Date: Sun Dec 29 16:00:01 2013 +0100 mpegtspacketizer: Fix ts_to_offset beyond last observed PCR The requested TS might be beyond the last observed PCR. In order to calculate a coherent offset, we need to use the last and previous-to-last groups. https://bugzilla.gnome.org/show_bug.cgi?id=721035 *** This bug has been marked as a duplicate of bug 721035 ***