nvdec: Correctly set the discontinuity flag

Instead of clearing the "valid timestamp" flag, which would result in a
timestamp mismatch after a discontinuity.

https://bugzilla.gnome.org/show_bug.cgi?id=787926
This commit is contained in:
Per-Erik Brodin 2017-09-19 17:18:48 -07:00 committed by Matthew Waters
parent b738774566
commit 650adc43a9

View file

@ -845,7 +845,7 @@ gst_nvdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
packet.flags = CUVID_PKT_TIMESTAMP;
if (GST_BUFFER_IS_DISCONT (frame->input_buffer))
packet.flags &= CUVID_PKT_DISCONTINUITY;
packet.flags |= CUVID_PKT_DISCONTINUITY;
if (!cuda_OK (cuvidParseVideoData (nvdec->parser, &packet)))
GST_WARNING_OBJECT (nvdec, "parser failed");