From: hyc Date: Sun, 21 Mar 2010 20:58:11 +0000 (+0000) Subject: Fix init bug from -r369 X-Git-Tag: v2.4~165 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=069f619cabf7bdaac390e3dcbe3ec192ccaf50e2;p=rtmpdump Fix init bug from -r369 git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@377 400ebc74-4327-4243-bc38-086b20814532 --- diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c index ce16284..5c9e1fe 100644 --- a/librtmp/rtmp.c +++ b/librtmp/rtmp.c @@ -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;