Opened 3 years ago
Closed 3 years ago
#9595 closed defect (invalid)
av_add_q(0/-1, -1/0) returns 1/0
Reported by: | namniav | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avutil |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Summary of the bug:
https://ffmpeg.org/doxygen/4.1/rational_8c_source.html#l00093
av_add_q(0/-1, -1/0) incorrectly returns 1/0.
Adding 0 to -inf should be -inf, not inf.
More generally, av_add_q(x/-1, -1/0) should return -inf, not inf.
Change History (2)
comment:1 by , 3 years ago
Description: | modified (diff) |
---|---|
Summary: | av_add_q(1/-1, -1/0) returns 1/0 → av_add_q(0/-1, -1/0) returns 1/0 |
comment:2 by , 3 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Add two rationals.
, neither +∞ nor -∞ are rationals.