rtspreal: don't construct config header with uninitialised bytes

Turns out 4 + 4 + 2 + (4 * 2) is actually 18 and not 22. This avoids
a presumably unintentional padding of uninitialised bytes at the end
of the CONT tags chunk, which should be harmless but causes warnings
in valgrind (see #608533 for a test URL).
This commit is contained in:
Tim-Philipp Müller 2010-01-31 13:03:33 +00:00
parent cd6b16734e
commit efc5181d13

View file

@ -324,6 +324,7 @@ rtsp_ext_real_parse_sdp (GstRTSPExtension * ext, GstSDPMessage * sdp,
ctx->duration = MAX (ctx->duration, intval); ctx->duration = MAX (ctx->duration, intval);
} }
/* FIXME: use GstByteWriter to write the header */
/* PROP */ /* PROP */
offset = 0; offset = 0;
size = 50; size = 50;
@ -352,7 +353,7 @@ rtsp_ext_real_parse_sdp (GstRTSPExtension * ext, GstSDPMessage * sdp,
READ_BUFFER (sdp, "Comment", comment, comment_len); READ_BUFFER (sdp, "Comment", comment, comment_len);
READ_BUFFER (sdp, "Copyright", copyright, copyright_len); READ_BUFFER (sdp, "Copyright", copyright, copyright_len);
size = 22 + title_len + author_len + comment_len + copyright_len; size = 18 + title_len + author_len + comment_len + copyright_len;
ENSURE_SIZE (offset + size); ENSURE_SIZE (offset + size);
datap = data + offset; datap = data + offset;