[Bug 654469] command-line base64 encoding parse error module rtpgstdepay

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sat Jul 16 15:41:47 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=654469
  GStreamer | gst-plugins-good | 0.10.35

--- Comment #5 from Raymond Westwater <rwestwater at futureware.com> 2011-07-16 22:41:42 UTC ---
(From update of attachment 191850)
>diff --git a/gst/rtp/gstrtpgstdepay.c b/gst/rtp/gstrtpgstdepay.c
>index 6dc5e51..074f7e0 100644
>--- a/gst/rtp/gstrtpgstdepay.c
>+++ b/gst/rtp/gstrtpgstdepay.c
>@@ -158,8 +158,12 @@ gst_rtp_gst_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
>   capsenc = gst_structure_get_string (structure, "caps");
>   if (capsenc) {
>     gsize out_len;
>-
>-    capsstr = (gchar *) g_base64_decode (capsenc, &out_len);
>+    gchar *capsenctmp;
>+    capsenctmp = malloc(strlen(capsenc)+3);
>+    strcpy(capsenctmp, capsenc);
>+    strcat(capsenctmp, "==");
>+    capsstr = (gchar *) g_base64_decode (capsenctmp, &out_len);
>+    free(capsenctmp);
>     outcaps = gst_caps_from_string (capsstr);
>     g_free (capsstr);
> 
>diff --git a/gst/rtp/gstrtpgstpay.c b/gst/rtp/gstrtpgstpay.c
>index e6e23de..ffb183d 100644
>--- a/gst/rtp/gstrtpgstpay.c
>+++ b/gst/rtp/gstrtpgstpay.c
>@@ -115,6 +115,10 @@ gst_rtp_gst_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
> 
>   capsstr = gst_caps_to_string (caps);
>   capsenc = g_base64_encode ((guchar *) capsstr, strlen (capsstr));
>+  while (capsenc[strlen(capsenc)-1]=='=')
>+  {
>+    capsenc[strlen(capsenc)-1]='\0';
>+  }
>   g_free (capsstr);
> 
>   gst_basertppayload_set_options (payload, "application", TRUE, "X-GST", 90000);

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list