diff options
author | Srimanta Panda <srimanta@axis.com> | 2014-07-22 13:24:09 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2014-08-01 16:01:07 +0100 |
commit | dd9f7168927239fe37244aba33ec618ddb9e4872 (patch) | |
tree | 85c8a1bd58bf2128d5b21228705f99ff2eabfb2d | |
parent | 72a5e5fe2d0f0db3e985585cc72097d3d3d8bf89 (diff) |
rtph264pay: append profile-level-id to SDP
Append profile-level-id to SDP if available.
https://bugzilla.gnome.org/show_bug.cgi?id=733539
-rw-r--r-- | gst/rtp/gstrtph264pay.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gst/rtp/gstrtph264pay.c b/gst/rtp/gstrtph264pay.c index 3d835aebc..d3e319bb0 100644 --- a/gst/rtp/gstrtph264pay.c +++ b/gst/rtp/gstrtph264pay.c @@ -390,12 +390,19 @@ gst_rtp_h264_pay_set_sps_pps (GstRTPBasePayload * basepayload) } if (G_LIKELY (count)) { - /* profile is 24 bit. Force it to respect the limit */ - profile = g_strdup_printf ("%06x", payloader->profile & 0xffffff); - /* combine into output caps */ - res = gst_rtp_base_payload_set_outcaps (basepayload, - "sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL); - g_free (profile); + if (payloader->profile != 0) { + /* profile is 24 bit. Force it to respect the limit */ + profile = g_strdup_printf ("%06x", payloader->profile & 0xffffff); + /* combine into output caps */ + res = gst_rtp_base_payload_set_outcaps (basepayload, + "profile-level-id", G_TYPE_STRING, profile, + "sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL); + g_free (profile); + } else { + res = gst_rtp_base_payload_set_outcaps (basepayload, + "sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL); + } + } else { res = gst_rtp_base_payload_set_outcaps (basepayload, NULL); } |