]> granicus.if.org Git - rtmpdump/commitdiff
Fix init bug from -r369
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Sun, 21 Mar 2010 20:58:11 +0000 (20:58 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Sun, 21 Mar 2010 20:58:11 +0000 (20:58 +0000)
git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@377 400ebc74-4327-4243-bc38-086b20814532

librtmp/rtmp.c

index ce16284f5a1ca24cfafbeb0f3858add2663798d3..5c9e1fee3388cea181bad29b4ea918b491e50640 100644 (file)
@@ -208,7 +208,12 @@ RTMP_Init(RTMP *r)
 
   memset(r, 0, sizeof(RTMP));
   r->m_sb.sb_socket = -1;
+  r->m_inChunkSize = RTMP_DEFAULT_CHUNKSIZE;
+  r->m_outChunkSize = RTMP_DEFAULT_CHUNKSIZE;
   r->m_nBufferMS = 300;
+  r->m_nClientBW = 2500000;
+  r->m_nClientBW2 = 2;
+  r->m_nServerBW = 2500000;
   r->m_fAudioCodecs = 3191.0;
   r->m_fVideoCodecs = 252.0;
 }
@@ -2749,14 +2754,9 @@ RTMP_Close(RTMP *r)
 
   r->m_stream_id = -1;
   r->m_sb.sb_socket = -1;
-  r->m_inChunkSize = RTMP_DEFAULT_CHUNKSIZE;
-  r->m_outChunkSize = RTMP_DEFAULT_CHUNKSIZE;
   r->m_nBWCheckCounter = 0;
   r->m_nBytesIn = 0;
   r->m_nBytesInSent = 0;
-  r->m_nClientBW = 2500000;
-  r->m_nClientBW2 = 2;
-  r->m_nServerBW = 2500000;
 
   r->m_read.buf = NULL;
   r->m_read.dataType = 0;