From 655c8559a6df42ddabcaa7ae606221bc9b6bfae4 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 28 Nov 2013 10:28:44 +0100 Subject: [PATCH] Fixed RTMP FLV conversion handling and added handshake fail error message. --- src/connectors/conn_rtmp.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/connectors/conn_rtmp.cpp b/src/connectors/conn_rtmp.cpp index f37e150a..d0fdf978 100644 --- a/src/connectors/conn_rtmp.cpp +++ b/src/connectors/conn_rtmp.cpp @@ -538,9 +538,7 @@ namespace Connector_RTMP { fprintf(stderr, "Handshake succcess!\n"); #endif }else{ - #if DEBUG >= 5 - fprintf(stderr, "Handshake fail!\n"); - #endif + fprintf(stderr, "RTMP: Handshake fail!\n"); return 0; } @@ -651,11 +649,12 @@ namespace Connector_RTMP { streamInited = true; } //sent a tag - tag.DTSCLoader(Strm); - Socket.SendNow(RTMPStream::SendMedia(tag)); - #if DEBUG >= 8 - fprintf(stderr, "Sent tag to %i: [%u] %s\n", Socket.getSocket(), tag.tagTime(), tag.tagType().c_str()); - #endif + if (tag.DTSCLoader(Strm)){ + Socket.SendNow(RTMPStream::SendMedia(tag)); + #if DEBUG >= 8 + fprintf(stderr, "Sent tag to %i: [%u] %s\n", Socket.getSocket(), tag.tagTime(), tag.tagType().c_str()); + #endif + } } } }