rtspsrc: avoid some strdup

This commit is contained in:
Wim Taymans 2013-07-02 11:13:25 +02:00
parent 7c950ef3f2
commit ab24598443

View file

@ -5517,8 +5517,7 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src, gboolean async)
* parameter */ * parameter */
if (src->rtp_blocksize > 0) { if (src->rtp_blocksize > 0) {
hval = g_strdup_printf ("%d", src->rtp_blocksize); hval = g_strdup_printf ("%d", src->rtp_blocksize);
gst_rtsp_message_add_header (&request, GST_RTSP_HDR_BLOCKSIZE, hval); gst_rtsp_message_take_header (&request, GST_RTSP_HDR_BLOCKSIZE, hval);
g_free (hval);
} }
if (async) if (async)
@ -6570,8 +6569,7 @@ gst_rtspsrc_play (GstRTSPSrc * src, GstSegment * segment, gboolean async)
if (src->need_range) { if (src->need_range) {
hval = gen_range_header (src, segment); hval = gen_range_header (src, segment);
gst_rtsp_message_add_header (&request, GST_RTSP_HDR_RANGE, hval); gst_rtsp_message_take_header (&request, GST_RTSP_HDR_RANGE, hval);
g_free (hval);
/* store the newsegment event so it can be sent from the streaming thread. */ /* store the newsegment event so it can be sent from the streaming thread. */
if (src->start_segment) if (src->start_segment)