diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-03-19 13:25:57 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-03-19 13:25:57 +0100 |
commit | f18dabdd571df302e7ef4ec88c5761d44b63126c (patch) | |
tree | 698241db1f380ca42bc7dacff82928ddcf05a671 /gst/rtp | |
parent | 710ff959e3f640ca4a53bb0d83eaa767db469399 (diff) |
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.
Diffstat (limited to 'gst/rtp')
-rw-r--r-- | 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 54cdbd7a..574493d9 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; } |