After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 710118 - tsdemux: warning/assert due to denominator == zero in mpegts_packetizer_ts_to_offset()
tsdemux: warning/assert due to denominator == zero in mpegts_packetizer_ts_to...
Status: RESOLVED DUPLICATE of bug 721035
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-14 16:22 UTC by Lori Anderson
Modified: 2014-02-20 15:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Elinimates zero denominator error (1.56 KB, patch)
2013-10-14 16:22 UTC, Lori Anderson
none Details | Review

Description Lori Anderson 2013-10-14 16:22:15 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.
Comment 1 Lori Anderson 2013-10-14 16:22:52 UTC
Created attachment 257279 [details] [review]
Elinimates zero denominator error
Comment 2 Sebastian Dröge (slomo) 2013-10-14 16:29:33 UTC
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.
Comment 3 Edward Hervey 2013-11-15 14:33:50 UTC
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).
Comment 4 Edward Hervey 2014-02-20 15:22:53 UTC
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 ***