rtph265depay: don't insert SPS/PPS inline for hvc1 output
authorTim-Philipp Müller <tim@centricular.com>
Tue, 5 Sep 2017 14:55:03 +0000 (15:55 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 23 Nov 2017 08:36:15 +0000 (09:36 +0100)
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

index e7c6c68..9b53dfd 100644 (file)
@@ -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;