Skip to content

msdkdec: align frame list using decoded timestamp

Josep Torra requested to merge adn770/gst-plugins-bad:fix-msdk-timestamps into master

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 ! ...
Edited by Josep Torra

Merge request reports