Opened 13 years ago
Closed 13 years ago
#4388 closed defect (fixed)
mytharchivehelper problem with getfileinfo and method 0
Reported by: | Owned by: | paulh | |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mytharchive | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
mytharchivehelper in version 0.20.2 makes an approximation due to a misplaced cast in the function getFileInfo. In particular on main.cpp line 1951, the original code:
root.setAttribute("duration", (uint) inputFC->duration / AV_TIME_BASE);
should be replaced by:
root.setAttribute("duration", (uint) (inputFC->duration / AV_TIME_BASE));
since casting has precedence over division and so the calculation is wrong in some cases, because inputFC->duration can easily exceed 232-1 since it is expressed in microseconds.
Change History (3)
Note: See
TracTickets for help on using
tickets.
(In [15259]) Fix a misplaced cast spotted by Michele Sardo. Fixes #4388.