Opened 9 years ago
Closed 8 years ago
#6742 closed defect (fixed)
ffmpeg-3.4/libavformat/nutdec.c:585: suspicious if ?
| Reported by: | dcb | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | git-master | Keywords: | nut |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description (last modified by )
[ffmpeg-3.4/libavformat/nutdec.c:585]: (style) Same expression on both sides of '||'.
Source code is
if (st->r_frame_rate.num >= 1000LL*st->r_frame_rate.den ||
st->r_frame_rate.num < 0 || st->r_frame_rate.num < 0)
maybe better code
if (st->r_frame_rate.num >= 1000LL*st->r_frame_rate.den ||
st->r_frame_rate.num < 0 || st->r_frame_rate.den < 0)
Change History (8)
comment:1 by , 8 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
comment:2 by , 8 years ago
| Component: | undetermined → avformat |
|---|---|
| Description: | modified (diff) |
| Keywords: | nut added |
| Reproduced by developer: | set |
| Resolution: | wontfix |
| Status: | closed → reopened |
| Version: | unspecified → git-master |
comment:3 by , 8 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 8 years ago
| Resolution: | → invalid |
|---|---|
| Status: | reopened → closed |
I see nothing wrong, both lines are same.
comment:5 by , 8 years ago
Suggest have another look, using Mark 1 eyeball.
Original code says something like
if (num >= 1000 * den
num < 0 num < 0)
That looks wrong to me. Suggest new code
if (num >= 1000 * den
num < 0 den < 0)
Looks a bit more rational to me.
comment:7 by , 8 years ago
| Resolution: | invalid |
|---|---|
| Status: | closed → reopened |
comment:8 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
Fixed in f2179afb01a35cce6189c878ae1ddfc84895676c.
Note:
See TracTickets
for help on using tickets.



Explanation not descriptive enough.