summaryrefslogtreecommitdiff
path: root/libavformat/sdp.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-06-06 14:13:02 +0200
committerDiego Biurrun <diego@biurrun.de>2012-03-28 09:38:33 +0200
commita92be9b856bd11b081041c43c25d442028fe9a63 (patch)
tree32f852fdf904a30238c789e57510be710eaa7826 /libavformat/sdp.c
parent856c8e0a049dc7069b7504d3aaa48549c75852de (diff)
Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
Diffstat (limited to 'libavformat/sdp.c')
-rw-r--r--libavformat/sdp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index b2c4f7bcd8..9692aabbc0 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -88,7 +88,7 @@ static void sdp_write_header(char *buff, int size, struct sdp_session_level *s)
static int resolve_destination(char *dest_addr, int size, char *type,
int type_size)
{
- struct addrinfo hints, *ai;
+ struct addrinfo hints = { 0 }, *ai;
int is_multicast;
av_strlcpy(type, "IP4", type_size);
@@ -98,7 +98,6 @@ static int resolve_destination(char *dest_addr, int size, char *type,
/* Resolve the destination, since it must be written
* as a numeric IP address in the SDP. */
- memset(&hints, 0, sizeof(hints));
if (getaddrinfo(dest_addr, NULL, &hints, &ai))
return 0;
getnameinfo(ai->ai_addr, ai->ai_addrlen, dest_addr, size,
@@ -581,12 +580,11 @@ void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *des
int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
{
AVDictionaryEntry *title = av_dict_get(ac[0]->metadata, "title", NULL, 0);
- struct sdp_session_level s;
+ struct sdp_session_level s = { 0 };
int i, j, port, ttl, is_multicast;
char dst[32], dst_type[5];
memset(buf, 0, size);
- memset(&s, 0, sizeof(struct sdp_session_level));
s.user = "-";
s.src_addr = "127.0.0.1"; /* FIXME: Properly set this */
s.src_type = "IP4";