From f3577dc8a767321faedf4eb3ea955e24bf9cb5bc Mon Sep 17 00:00:00 2001 From: Hyunsoo Park Date: Thu, 10 May 2018 11:16:59 +0900 Subject: [PATCH] Remove duplicate 'Content-Length' field in rtsp message. When negotiating, 'GET_PARAMETER', 'SET_PARAMETER' steps sends 'Content-Length' field two times. 'Content-Length' is already included on base rtsp(gst-plugins-base). But we added it one more time when inherited plugin makes messges. So i remove it. Change-Id: I81061310ac4a5fce99e431d40049885a69b85c86 Signed-off-by: Hyunsoo Park --- gst/rtsp-server/rtsp-client-wfd.c | 22 ++-------------------- packaging/gst-rtsp-server.spec | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/gst/rtsp-server/rtsp-client-wfd.c b/gst/rtsp-server/rtsp-client-wfd.c index 75fdaa5..96cb419 100644 --- a/gst/rtsp-server/rtsp-client-wfd.c +++ b/gst/rtsp-server/rtsp-client-wfd.c @@ -2770,18 +2770,9 @@ gst_prepare_request (GstRTSPWFDClient * client, GstRTSPMessage * request, g_string_append_printf (msglength, "%d", msglen); GST_DEBUG ("M3 server side message body: %s", msg); - /* add content-length type */ - res = - gst_rtsp_message_add_header (request, GST_RTSP_HDR_CONTENT_LENGTH, - g_string_free (msglength, FALSE)); - if (res != GST_RTSP_OK) { - GST_ERROR_OBJECT (client, "Failed to add header to rtsp message..."); - goto error; - } - res = gst_rtsp_message_set_body (request, (guint8 *) msg, msglen); if (res != GST_RTSP_OK) { - GST_ERROR_OBJECT (client, "Failed to add header to rtsp message..."); + GST_ERROR_OBJECT (client, "Failed to set body data to rtsp message..."); goto error; } @@ -2809,18 +2800,9 @@ gst_prepare_request (GstRTSPWFDClient * client, GstRTSPMessage * request, g_string_append_printf (msglength, "%d", msglen); GST_DEBUG ("M4 server side message body: %s", msg); - /* add content-length type */ - res = - gst_rtsp_message_add_header (request, GST_RTSP_HDR_CONTENT_LENGTH, - g_string_free (msglength, FALSE)); - if (res != GST_RTSP_OK) { - GST_ERROR_OBJECT (client, "Failed to add header to rtsp message..."); - goto error; - } - res = gst_rtsp_message_set_body (request, (guint8 *) msg, msglen); if (res != GST_RTSP_OK) { - GST_ERROR_OBJECT (client, "Failed to add header to rtsp message..."); + GST_ERROR_OBJECT (client, "Failed to set body data to rtsp message..."); goto error; } diff --git a/packaging/gst-rtsp-server.spec b/packaging/gst-rtsp-server.spec index 674c04c..c17c732 100644 --- a/packaging/gst-rtsp-server.spec +++ b/packaging/gst-rtsp-server.spec @@ -1,7 +1,7 @@ Name: gst-rtsp-server Summary: Multimedia Framework Library Version: 1.12.2 -Release: 2 +Release: 3 Url: http://gstreamer.freedesktop.org/ Group: System/Libraries License: LGPL-2.0+ -- 2.7.4