@@ -92,6 +92,7 @@ static int rtmp_command_onresult(struct rtmp_t* rtmp, double transaction, const
9292 double duration = 0 ;
9393 struct rtmp_result_t result ;
9494
95+ memset (& result , 0 , sizeof (result ));
9596 switch ((uint32_t )transaction )
9697 {
9798 case RTMP_TRANSACTION_CONNECT :
@@ -124,6 +125,7 @@ static int rtmp_command_onresult(struct rtmp_t* rtmp, double transaction, const
124125// struct amf_object_item_t info[3];
125126// struct amf_object_item_t items[2];
126127//
128+ // memset(&result, 0, sizeof(result));
127129// AMF_OBJECT_ITEM_VALUE(info[0], AMF_STRING, "code", result.code, sizeof(result.code));
128130// AMF_OBJECT_ITEM_VALUE(info[1], AMF_STRING, "level", result.level, sizeof(result.level));
129131// AMF_OBJECT_ITEM_VALUE(info[2], AMF_STRING, "description", result.description, sizeof(result.description));
@@ -152,6 +154,7 @@ static int rtmp_command_onstatus(struct rtmp_t* rtmp, double transaction, const
152154 struct amf_object_item_t items [2 ];
153155 struct amf_object_item_t redirect [2 ];
154156
157+ memset (& result , 0 , sizeof (result ));
155158 AMF_OBJECT_ITEM_VALUE (redirect [0 ], AMF_NUMBER , "code" , & code , sizeof (code ));
156159 AMF_OBJECT_ITEM_VALUE (redirect [1 ], AMF_STRING , "redirect" , tcurl , sizeof (tcurl ));
157160
0 commit comments