From e2d22da410b9ca9a723d46cbf1ea3f22f7116f21 Mon Sep 17 00:00:00 2001 From: hyc Date: Mon, 14 Dec 2009 00:37:51 +0000 Subject: [PATCH] Fix prev commit git-svn-id: svn://svn.mplayerhq.hu/rtmpdump@60 400ebc74-4327-4243-bc38-086b20814532 --- rtmp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rtmp.cpp b/rtmp.cpp index 74fe24f..682c7c7 100644 --- a/rtmp.cpp +++ b/rtmp.cpp @@ -1829,13 +1829,15 @@ bool CRTMP::SendRTMP(RTMPPacket &packet) nSize = packet.m_nBodySize; char *buffer = packet.m_body; - int nChunkSize = nSize > RTMP_DEFAULT_CHUNKSIZE ? - RTMP_DEFAULT_CHUNKSIZE : nSize; + int nChunkSize = RTMP_DEFAULT_CHUNKSIZE; while (nSize) { int wrote; + if (nSize < nChunkSize) + nChunkSize = nSize; + if (header) { wrote=WriteN(header, nChunkSize+hSize); header = NULL; -- 2.40.0