rtmp2: Minor changes
authorJan Alexander Steffens (heftig) <jsteffens@make.tv>
Wed, 27 Nov 2019 14:36:07 +0000 (15:36 +0100)
committerJan Alexander Steffens (heftig) <jsteffens@make.tv>
Tue, 3 Dec 2019 13:11:46 +0000 (14:11 +0100)
- Remove an unneeded initialization to zero from AmfParser
- Add missing initialization to gst_amf_serialize_command_valist
- Add a g_return_if_fail to gst_rtmp_connection_request_window_size

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/878

gst/rtmp2/rtmp/amf.c
gst/rtmp2/rtmp/rtmpconnection.c

index a6f5b3b..895570f 100644 (file)
@@ -893,7 +893,6 @@ gst_amf_parse_command (const guint8 * data, gsize size,
   AmfParser parser = {
     .data = data,
     .size = size,
-    .recursion_depth = 0,
   };
   GstAmfNode *node1 = NULL, *node2 = NULL;
   GPtrArray *args = NULL;
@@ -1119,6 +1118,8 @@ gst_amf_serialize_command_valist (gdouble transaction_id,
   g_return_val_if_fail (command_name, NULL);
   g_return_val_if_fail (argument, NULL);
 
+  init_static ();
+
   GST_LOG ("Serializing command '%s', transid %.0f", command_name,
       transaction_id);
 
index 8c14516..d895f8e 100644 (file)
@@ -989,6 +989,8 @@ gst_rtmp_connection_request_window_size (GstRtmpConnection * connection,
     .param = window_ack_size,
   };
 
+  g_return_if_fail (GST_IS_RTMP_CONNECTION (connection));
+
   if (connection->out_window_ack_size == window_ack_size)
     return;