Skip to content
  • Josep Torra's avatar
    msdkdec: align frame list using decoded timestamp · ef374464
    Josep Torra authored and Haihao Xiang's avatar Haihao Xiang committed
    Before this change decoder used the oldest frame in the list to pair it
    with the decoded surface. This only works when there's a perfect stream
    like HEADERS,SYNCPOINT,DELTA...
    
    When playing RTSP streams we can get imperfect streams like HEADERS,
    DELTA,SYNCPOINT,DELTA... In this case decoder drops the frames
    between HEADERS and SYNCPOINT which leads into using wrong PTS on
    the output frames.
    
    With this change we inject the input PTS into the bitstream and use it
    to align the internal frame list with the actually decoded position.
    
    Fixes playback with:
    ```
    gst-launch-1.0 rtspsrc location=... latency=0 drop-on-latency=1 ! ...
    ```
    ef374464