[gst-cvs] gst-plugins-good: rtph264depay: fix base64 decoding
Wim Taymans
wtay at kemper.freedesktop.org
Thu Mar 19 05:26:03 PDT 2009
Module: gst-plugins-good
Branch: master
Commit: f18dabdd571df302e7ef4ec88c5761d44b63126c
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=f18dabdd571df302e7ef4ec88c5761d44b63126c
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Thu Mar 19 13:25:57 2009 +0100
rtph264depay: fix base64 decoding
We can't pass -1 to _decode_step, that functions returns 0 right away instead of
decoding up to the string end.
---
gst/rtp/gstrtph264depay.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gst/rtp/gstrtph264depay.c b/gst/rtp/gstrtph264depay.c
index 54cdbd7..574493d 100644
--- a/gst/rtp/gstrtph264depay.c
+++ b/gst/rtp/gstrtph264depay.c
@@ -251,10 +251,13 @@ gst_rtp_h264_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
guint save = 0;
gint state = 0;
- GST_DEBUG_OBJECT (depayload, "decoding param %d", i);
+ GST_DEBUG_OBJECT (depayload, "decoding param %d (%s)", i, params[i]);
memcpy (b64, sync_bytes, sizeof (sync_bytes));
b64 += sizeof (sync_bytes);
- len = g_base64_decode_step (params[i], -1, b64, &state, &save);
+ len =
+ g_base64_decode_step (params[i], strlen (params[i]), b64, &state,
+ &save);
+ GST_DEBUG_OBJECT (depayload, "decoded %d bytes", len);
total += len + sizeof (sync_bytes);
b64 += len;
}
More information about the Gstreamer-commits
mailing list