From f3bf83ddab5caea127b0a1950598e87b9e29a7a2 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Fri, 5 Nov 2010 00:06:14 +0100 Subject: [PATCH] NOG NOG meer fix --- Connector_RTMP/chunkstream.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Connector_RTMP/chunkstream.cpp b/Connector_RTMP/chunkstream.cpp index 1c2056e6..9d9247aa 100644 --- a/Connector_RTMP/chunkstream.cpp +++ b/Connector_RTMP/chunkstream.cpp @@ -480,10 +480,11 @@ chunkpack * AddChunkPart(chunkpack newchunk){ chunkpack getWholeChunk(){ static chunkpack gwc_next, gwc_complete; static bool clean = false; + int counter = 0; if (!clean){gwc_complete.data = 0; clean = true;}//prevent brain damage chunkpack * ret = 0; scrubChunk(gwc_complete); - while (true){ + while (counter < 10000){ gwc_next = getChunk(); ret = AddChunkPart(gwc_next); scrubChunk(gwc_next); @@ -492,9 +493,9 @@ chunkpack getWholeChunk(){ free(ret);//cleanup returned chunk return gwc_complete; } - if (feof(stdin)){ - gwc_complete.msg_type_id = 0; - return gwc_complete; - } + if (feof(stdin) != 0){break;} + counter++; } + gwc_complete.msg_type_id = 0; + return gwc_complete; }//getWholeChunk