From ab2459844361d64c06a032376766de1456311324 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 2 Jul 2013 11:13:25 +0200 Subject: [PATCH] rtspsrc: avoid some strdup --- gst/rtsp/gstrtspsrc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 8b8c3fefc0..c0c05a2c1c 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -5517,8 +5517,7 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src, gboolean async) * parameter */ if (src->rtp_blocksize > 0) { hval = g_strdup_printf ("%d", src->rtp_blocksize); - gst_rtsp_message_add_header (&request, GST_RTSP_HDR_BLOCKSIZE, hval); - g_free (hval); + gst_rtsp_message_take_header (&request, GST_RTSP_HDR_BLOCKSIZE, hval); } if (async) @@ -6570,8 +6569,7 @@ gst_rtspsrc_play (GstRTSPSrc * src, GstSegment * segment, gboolean async) if (src->need_range) { hval = gen_range_header (src, segment); - gst_rtsp_message_add_header (&request, GST_RTSP_HDR_RANGE, hval); - g_free (hval); + gst_rtsp_message_take_header (&request, GST_RTSP_HDR_RANGE, hval); /* store the newsegment event so it can be sent from the streaming thread. */ if (src->start_segment)