mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +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.payload = NULL;
|
||||||
packet.flags = CUVID_PKT_ENDOFSTREAM;
|
packet.flags = CUVID_PKT_ENDOFSTREAM;
|
||||||
|
|
||||||
|
nvdec->state = GST_NVDEC_STATE_PARSE;
|
||||||
|
|
||||||
if (nvdec->parser
|
if (nvdec->parser
|
||||||
&& !gst_cuda_result (CuvidParseVideoData (nvdec->parser, &packet)))
|
&& !gst_cuda_result (CuvidParseVideoData (nvdec->parser, &packet)))
|
||||||
GST_WARNING_OBJECT (nvdec, "parser failed");
|
GST_WARNING_OBJECT (nvdec, "parser failed");
|
||||||
|
|
Loading…
Reference in a new issue