Git Product home page Git Product logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Please provide a short code-snippet which shows 2 cases; one where 
MP4ConvertTime() works as intended, and 
one where it returns wrong duration.

Original comment by [email protected] on 8 Dec 2008 at 10:34

from mp4v2.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
For example: MP4ConvertTime(5618688, 48000, 600) returns 65844, while a correct 
value would be ~70234.

MP4ConvertTime(1000, 48000, 24000); works as advertised instead.

Well it seems the problem is that using integer to do this calculation may 
result in some approximation, I don't 
think it would do any harm to use float for everything.

Original comment by damiog on 8 Dec 2008 at 11:37

from mp4v2.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
I do not get the results you list -- how can you get negative; it's an unsigned 
64-bit int. Need more information, 
maybe it's your platform or compiler. The results I got are 70233 which is 
correct.

This would probably be easier if you dropped by IRC.freenode.net channel #mp4v2 
.

Original comment by [email protected] on 8 Dec 2008 at 12:12

from mp4v2.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Woops sorry, yes MP4ConvertTime is working fine, the bugs must be somewhere 
else. I'll try to track it down.
Btw I am not getting a negative number, but a smaller number. It was a tilde 
(~) not a - ;)

Original comment by damiog on 8 Dec 2008 at 1:49

from mp4v2.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
The problem was in void MP4Track::UpdateDurations(MP4Duration duration). It was 
transforming the duration of 
each sample to the new timescale and then it added it to the track duration. 
This was introducing a small 
conversion error for each sample that was accumulated over time. I fixed it by 
calculating a new media duration 
from the track duration.


Original comment by damiog on 8 Dec 2008 at 2:51

Attachments:

from mp4v2.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
patch applied to trunk@195

Original comment by [email protected] on 24 Dec 2008 at 9:30

from mp4v2.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024

Original comment by [email protected] on 24 Dec 2008 at 9:30

  • Changed state: Fixed

from mp4v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.