Browse Source

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.
jp9000 5 years ago
parent
commit
746a522986
2 changed files with 1 additions and 7 deletions
  1. 1 0
      plugins/obs-outputs/flv-mux.c
  2. 0 7
      plugins/obs-outputs/librtmp/rtmp.c

+ 1 - 0
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;

+ 0 - 7
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
         {