nvdec: Do not map GStreamer discont to CUVid discont
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 23 Jan 2020 16:01:33 +0000 (11:01 -0500)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 25 Jan 2020 13:39:03 +0000 (13:39 +0000)
commitd393232bc20ce8902ca3ab2c46a4ef0a73a64b2a
treec94583f1dc32d1b819731614933f88f1c17db91e
parenta28ce16b3f748de621da6402d416f74d6748cb45
nvdec: Do not map GStreamer discont to CUVid discont

Setting the CUVID_PKT_DISCONTINUITY implies clearing any past information
about the stream in the decoder. The GStreamer discont flag is used for
discontinuity caused by a seek, for first buffer and if a buffer was
dropped. In the first two cases, the parsers and demuxers should ensure we
start from a synchronization point, so it's unlikely that delta will be
matched against the wrong state.

For packet lost, the discontinuity flag will prevent the decoder from doing
any concealment, with a result that ca be much worst visually, or freeze the
playback until an IDR is met. It's better to let the decoder handle that for
us.

Removing this flag, also workaround a but in NVidia parser that makes it
ignore our ENDOFFRAME flag and increase the latency by one frame.
sys/nvcodec/gstnvdec.c