Fill the buffer with 0 before writing an SDP in it

Originally committed as revision 10287 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Luca Abeni 2007-09-03 09:00:40 +00:00
parent 1c746a490d
commit 5f2cbb53b4

View File

@ -175,6 +175,7 @@ int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size)
int i, j, port, ttl;
char dst[32];
memset(buff, 0, size);
memset(&s, 0, sizeof(struct sdp_session_level));
s.user = "-";
s.src_addr = "127.0.0.1"; /* FIXME: Properly set this */