[rtmpdump] r369 - in trunk/librtmp: dh.h rtmp.c

hyc subversion at mplayerhq.hu
Fri Mar 19 10:23:27 CET 2010


Author: hyc
Date: Fri Mar 19 10:23:26 2010
New Revision: 369

Log:
Initialization fixes

Modified:
   trunk/librtmp/dh.h
   trunk/librtmp/rtmp.c

Modified: trunk/librtmp/dh.h
==============================================================================
--- trunk/librtmp/dh.h	Thu Mar 18 21:56:24 2010	(r368)
+++ trunk/librtmp/dh.h	Fri Mar 19 10:23:26 2010	(r369)
@@ -219,7 +219,7 @@ DHGenerateKey(MDH *dh)
       if (!MDH_generate_key(dh))
 	return 0;
 
-      MP_t q1;
+      MP_t q1 = NULL;
       MP_gethex(&q1, Q1024, res);
       assert(res);
 
@@ -276,7 +276,7 @@ static int
 DHComputeSharedSecretKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen,
 			 uint8_t *secret)
 {
-  MP_t q1, pubkeyBn = NULL;
+  MP_t q1 = NULL, pubkeyBn = NULL;
   size_t len;
   int res;
 

Modified: trunk/librtmp/rtmp.c
==============================================================================
--- trunk/librtmp/rtmp.c	Thu Mar 18 21:56:24 2010	(r368)
+++ trunk/librtmp/rtmp.c	Fri Mar 19 10:23:26 2010	(r369)
@@ -203,28 +203,14 @@ RTMP_TLS_Init()
 void
 RTMP_Init(RTMP *r)
 {
-  int i;
-
   if (!RTMP_TLS_ctx)
     RTMP_TLS_Init();
 
-  for (i = 0; i < RTMP_CHANNELS; i++)
-    {
-      r->m_vecChannelsIn[i] = NULL;
-      r->m_vecChannelsOut[i] = NULL;
-    }
+  memset(r, 0, sizeof(RTMP));
   r->m_sb.sb_socket = -1;
-  r->m_write.m_body = NULL;
-  RTMP_Close(r);
   r->m_nBufferMS = 300;
-  r->m_fDuration = 0;
-  r->m_sb.sb_start = NULL;
   r->m_fAudioCodecs = 3191.0;
   r->m_fVideoCodecs = 252.0;
-  r->m_fEncoding = 0.0;
-  r->m_sb.sb_timedout = false;
-  r->m_pausing = 0;
-  r->m_mediaChannel = 0;
 }
 
 double


More information about the rtmpdump mailing list