x265: Fix tagging of keyframes on output buffers
authorJames Stevenson <james@stev.org>
Fri, 23 Mar 2018 13:42:05 +0000 (13:42 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 23 Mar 2018 14:10:57 +0000 (14:10 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=794620

ext/x265/gstx265enc.c

index d8d18b0..670d02f 100644 (file)
@@ -1118,6 +1118,10 @@ gst_x265_enc_encode_frame (GstX265Enc * encoder, x265_picture * pic_in,
     offset += nal[i].sizeBytes;
   }
 
+  if (pic_out.sliceType == X265_TYPE_IDR || pic_out.sliceType == X265_TYPE_I) {
+    GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
+  }
+
   frame->output_buffer = out_buf;
 
   if (encoder->push_header) {