mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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.
This commit is contained in:
parent
d687466ac1
commit
2826212827
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-06-13 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/rtp/gstrtph264depay.c: (gst_rtp_h264_depay_setcaps):
|
||||||
|
Make sure we allocate enough memory for the codec_data.
|
||||||
|
Fixes #447210.
|
||||||
|
|
||||||
2007-06-12 Sebastien Moutte <sebastien@moutte.net>
|
2007-06-12 Sebastien Moutte <sebastien@moutte.net>
|
||||||
|
|
||||||
* win32/MANIFEST:
|
* win32/MANIFEST:
|
||||||
|
|
|
@ -237,10 +237,12 @@ gst_rtp_h264_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||||
ps = gst_structure_get_string (structure, "sprop-parameter-sets");
|
ps = gst_structure_get_string (structure, "sprop-parameter-sets");
|
||||||
params = g_strsplit (ps, ",", 0);
|
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;
|
len = 0;
|
||||||
for (i = 0; params[i]; i++) {
|
for (i = 0; params[i]; i++) {
|
||||||
len += strlen (params[i]);
|
len += strlen (params[i]);
|
||||||
|
len += sizeof (sync_bytes);
|
||||||
}
|
}
|
||||||
/* we seriously overshoot the length, but it's fine. */
|
/* we seriously overshoot the length, but it's fine. */
|
||||||
codec_data = gst_buffer_new_and_alloc (len);
|
codec_data = gst_buffer_new_and_alloc (len);
|
||||||
|
|
Loading…
Reference in a new issue