Skip to content
  • Jan Gerber's avatar
    Patch by Chris Pearce to tweak indexing in ffmpeg2theora to make it more accurate. · 68fcbb07
    Jan Gerber authored
    Fixes:
    1. Use ogg_int64_t to calculate and store presentation times of
       frames, rather than transitioning through double just to cast back
       to ogg_int64_t. Prevents floating point rounding errors from
       making frames sometimes off by 1ms.
    2. Calculate the duration of vorbis packets using the vorbis
       block/window data. This means that we can accurately know what
       presentation time we'll get if we decode a vorbis packet. Using
       this and the knowledge that vorbis packets require their preceding
       packet to decode, we can now accurately calculate the presentation
       time we'd get if we began decoding from a vorbis page (rather than
       just taking the previous page's end-time, which doesn't take into
       account the fact that we can't decode the first vorbis packet).
    
    
    68fcbb07