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_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;