Commit ff0da4b4 authored by Yann Diorcet's avatar Yann Diorcet
Browse files

Init timestamp at mblk_init

parent 9d8e0cc6
...@@ -1000,7 +1000,6 @@ int rtp_session_rtp_recv_abstract(ortp_socket_t socket, mblk_t *msg, int flags, ...@@ -1000,7 +1000,6 @@ int rtp_session_rtp_recv_abstract(ortp_socket_t socket, mblk_t *msg, int flags,
if(fromlen != NULL) if(fromlen != NULL)
*fromlen = msghdr.msg_namelen; *fromlen = msghdr.msg_namelen;
#if defined(ORTP_TIMESTAMP) #if defined(ORTP_TIMESTAMP)
memset(&msg->timestamp, 0, sizeof(struct timeval));
if(ret >= 0) { if(ret >= 0) {
for (cmsghdr = CMSG_FIRSTHDR(&msghdr); cmsghdr != NULL ; cmsghdr = CMSG_NXTHDR(&msghdr, cmsghdr)) { for (cmsghdr = CMSG_FIRSTHDR(&msghdr); cmsghdr != NULL ; cmsghdr = CMSG_NXTHDR(&msghdr, cmsghdr)) {
if (cmsghdr->cmsg_level == SOL_SOCKET && cmsghdr->cmsg_type == SO_TIMESTAMP) { if (cmsghdr->cmsg_level == SOL_SOCKET && cmsghdr->cmsg_type == SO_TIMESTAMP) {
......
...@@ -35,6 +35,9 @@ void mblk_init(mblk_t *mp) ...@@ -35,6 +35,9 @@ void mblk_init(mblk_t *mp)
mp->b_rptr=mp->b_wptr=NULL; mp->b_rptr=mp->b_wptr=NULL;
mp->reserved1=0; mp->reserved1=0;
mp->reserved2=0; mp->reserved2=0;
#if defined(ORTP_TIMESTAMP)
memset(&(mp->timestamp), 0, sizeof(struct timeval));
#endif
} }
void mblk_meta_copy(const mblk_t *source, mblk_t *dest) { void mblk_meta_copy(const mblk_t *source, mblk_t *dest) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment