diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-06-13 17:11:24 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-06-13 17:11:24 +0000 |
commit | 2826212827b04ab9a9e26c2f057e45f0e6d6e14b (patch) | |
tree | a79f4d3814710db04f3ec91e8ec38f4ebbbd9180 /gst/rtp/gstrtph264depay.c | |
parent | d687466ac193c8ebffdd13ca5583f00eeaec37fb (diff) |
gst/rtp/gstrtph264depay.c: Make sure we allocate enough memory for the codec_data.
Original commit message from CVS:
* gst/rtp/gstrtph264depay.c: (gst_rtp_h264_depay_setcaps):
Make sure we allocate enough memory for the codec_data.
Fixes #447210.
Diffstat (limited to 'gst/rtp/gstrtph264depay.c')
-rw-r--r-- | gst/rtp/gstrtph264depay.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/rtp/gstrtph264depay.c b/gst/rtp/gstrtph264depay.c index 1b1fffbd..164ef56c 100644 --- a/gst/rtp/gstrtph264depay.c +++ b/gst/rtp/gstrtph264depay.c @@ -237,10 +237,12 @@ gst_rtp_h264_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) ps = gst_structure_get_string (structure, "sprop-parameter-sets"); params = g_strsplit (ps, ",", 0); - /* count total number of bytes in base64 */ + /* count total number of bytes in base64. Also include the sync bytes in + * front of the params. */ len = 0; for (i = 0; params[i]; i++) { len += strlen (params[i]); + len += sizeof (sync_bytes); } /* we seriously overshoot the length, but it's fine. */ codec_data = gst_buffer_new_and_alloc (len); |