From 746a5229862832db1fbae949c548ecd65aa6ca3d Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 16 Aug 2020 01:46:02 -0700 Subject: [PATCH] obs-outputs: Don't assume @setDataFrame Don't assume @setDataFrame when using an info packet. I'm guessing librtmp did this because the only time this packet type was normally used was when you use onMetaData. --- plugins/obs-outputs/flv-mux.c | 1 + plugins/obs-outputs/librtmp/rtmp.c | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/obs-outputs/flv-mux.c b/plugins/obs-outputs/flv-mux.c index eb1595fb8..40659960a 100644 --- a/plugins/obs-outputs/flv-mux.c +++ b/plugins/obs-outputs/flv-mux.c @@ -73,6 +73,7 @@ static bool build_flv_meta_data(obs_output_t *context, uint8_t **output, if (a_idx > 0 && !aencoder) return false; + enc_str(&enc, end, "@setDataFrame"); enc_str(&enc, end, "onMetaData"); *enc++ = AMF_ECMA_ARRAY; diff --git a/plugins/obs-outputs/librtmp/rtmp.c b/plugins/obs-outputs/librtmp/rtmp.c index 0fe63a356..262e5e330 100644 --- a/plugins/obs-outputs/librtmp/rtmp.c +++ b/plugins/obs-outputs/librtmp/rtmp.c @@ -5319,8 +5319,6 @@ RTMP_Write(RTMP *r, const char *buf, int size, int streamIdx) !pkt->m_nTimeStamp) || pkt->m_packetType == RTMP_PACKET_TYPE_INFO) { pkt->m_headerType = RTMP_PACKET_SIZE_LARGE; - if (pkt->m_packetType == RTMP_PACKET_TYPE_INFO) - pkt->m_nBodySize += 16; } else { @@ -5334,11 +5332,6 @@ RTMP_Write(RTMP *r, const char *buf, int size, int streamIdx) } enc = pkt->m_body; pend = enc + pkt->m_nBodySize; - if (pkt->m_packetType == RTMP_PACKET_TYPE_INFO) - { - enc = AMF_EncodeString(enc, pend, &av_setDataFrame); - pkt->m_nBytesRead = enc - pkt->m_body; - } } else {