mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
nvdec: Fix timestamp mismatch on draining frames
The internal decoding state must be GST_NVDEC_STATE_PARSE before calling CuvidParseVideoData(). Otherwise, nvdec will be confused on decode callback as if the frame is decoding only frame and the input timestamp of corresponding frame will be ignored. Eventually one decoded frame will have non-increased PTS.
This commit is contained in:
parent
a427b36f79
commit
f7b2b1b99d
1 changed files with 2 additions and 0 deletions
|
@ -1039,6 +1039,8 @@ gst_nvdec_drain (GstVideoDecoder * decoder)
|
|||
packet.payload = NULL;
|
||||
packet.flags = CUVID_PKT_ENDOFSTREAM;
|
||||
|
||||
nvdec->state = GST_NVDEC_STATE_PARSE;
|
||||
|
||||
if (nvdec->parser
|
||||
&& !gst_cuda_result (CuvidParseVideoData (nvdec->parser, &packet)))
|
||||
GST_WARNING_OBJECT (nvdec, "parser failed");
|
||||
|
|
Loading…
Reference in a new issue