Skip to content
  • Nicolas Dufresne's avatar
    h265parse: Don't wait for next NAL if input is aligned · e88d8480
    Nicolas Dufresne authored and Nicolas Dufresne's avatar Nicolas Dufresne committed
    Waiting for the next NAL increases the latency. If alignment=nal/au
    has been negotiated, assumes the the buffer contains a complete
    NAL and don't expect a second start-code. This way, nal -> nal,
    au -> au and au -> nal no longer introduce latency.
    
    As a side effect, the collect_pad() function was not able to poke at the
    following NAL. This call is now moved before processing the NAL, so
    it's looking at the current NAL before it's ingested into the parser
    state in order to dermin if the end of an AU has been reached. The AUD
    injection state as been adapted to support this.
    
    This change will break pipelines if alignment=nal is used without respecting the
    alignment. Effectively, the parser will no longer fix the broken aligment
    which will result in parser error and the termination of the pipeline. Such
    issue existed in tsdemux element and might exist in any forks of that code.
    
    Related to !1193
    e88d8480