nvdec: Correctly set the discontinuity flag
authorPer-Erik Brodin <per-erik.brodin@ericsson.com>
Wed, 20 Sep 2017 00:18:48 +0000 (17:18 -0700)
committerMatthew Waters <matthew@centricular.com>
Wed, 20 Sep 2017 01:22:15 +0000 (11:22 +1000)
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

sys/nvdec/gstnvdec.c

index b643b4d..618c990 100644 (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");