• Thiago Santos's avatar
    qtdemux: do not ignore empty segments · 90a55652
    Thiago Santos authored
    Make sure empty segments are used and pushed with a gap event
    to represent its data (or lack of it)
    
    Each QtSegment is mapped into a GstSegment with the corresponding
    media range. For empty QtSegments a gap event is pushed instead
    of GstBuffers and it advances to the next QtSegment.
    
    To make this work with seeks, need to keep track of the starting
    'base' to make sure it remains consistently increasing when
    pushing new segment events.
    For example: if a seek makes qtdemux start from 5s, the first
    segment will have a base=0. When the next segment is activated,
    its base time will be QtSegment.time - qtdemux.segment_base so
    that it doesn't include the first 5s that weren't played and
    shouldn't be accounted on the running time
    
    This purposedly will remove the fix made for
    https://bugzilla.gnome.org/show_bug.cgi?id=700264, at this
    point it was decided to respect the gaps, even if they cause
    a delay on playback, because that's the way the file was crafted.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=345830
    90a55652
qtdemux.h 4.58 KB