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 446572 - [queue2] Division by zero
[queue2] Division by zero
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal normal
: 0.10.14
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-12 01:22 UTC by Thiago Sousa Santos
Modified: 2007-06-12 08:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Fixes the bug. (542 bytes, patch)
2007-06-12 01:36 UTC, Thiago Sousa Santos
committed Details | Review

Description Thiago Sousa Santos 2007-06-12 01:22:49 UTC
Please describe the problem:
When high_percent property is set to zero, a division by zero occurs. (you have to set use_buffering to true, also)

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?
Yes

Other information:
Comment 1 Thiago Sousa Santos 2007-06-12 01:36:14 UTC
Created attachment 89784 [details] [review]
Fixes the bug.

"percent = percent * 100 / queue->high_percent;"

this line was the problem.

This patch considers that if the high_percent is <= 0, it's the same as not use buffering, fixing the problem.
Comment 2 Wim Taymans 2007-06-12 08:38:42 UTC
        Patches by: Thiago Sousa Santos <thiagossantos at gmail dot com>

        * gst/playback/gstqueue2.c: (update_buffering),
        (gst_queue_locked_enqueue):
        Fix a division by zero when the max percent is <= 0. Fixes #446572.
        also update the buffering status when receiving events. Fixes #446551.