From c8ff20508923795571ab4705a0d15f20ade71c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 5 Sep 2017 15:55:03 +0100 Subject: [PATCH] rtph265depay: don't insert SPS/PPS inline for hvc1 output Only for byte-stream or hev1. For hvc1 the SPS/PPS are in the caps as codec_data field and in this case they shouldn't be in the stream data as well. The output caps should be updated with the new codec_data if needed, for hvc1. --- gst/rtp/gstrtph265depay.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/rtp/gstrtph265depay.c b/gst/rtp/gstrtph265depay.c index e7c6c68ac6..9b53dfd662 100644 --- a/gst/rtp/gstrtph265depay.c +++ b/gst/rtp/gstrtph265depay.c @@ -611,7 +611,8 @@ gst_rtp_h265_set_src_caps (GstRtpH265Depay * rtph265depay) gst_caps_unref (srccaps); /* Insert SPS and PPS into the stream on next opportunity */ - if (rtph265depay->sps->len > 0 || rtph265depay->pps->len > 0) { + if (rtph265depay->output_format != GST_H265_STREAM_FORMAT_HVC1 + && (rtph265depay->sps->len > 0 || rtph265depay->pps->len > 0)) { gint i; GstBuffer *codec_data; GstMapInfo map;