From 99ee5fb2d96ee5eaa1d81a05a968a2c92051bde6 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sat, 10 Apr 2021 04:40:46 +0530 Subject: [PATCH] rtspsrc: Just assign the segment instead of memcpy Assignments copy by value, we don't need to memcpy... Part-of: --- gst/rtsp/gstrtspsrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 51a70b73b8..9f5c3f7505 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -2852,7 +2852,7 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event) /* copy segment, we need this because we still need the old * segment when we close the current segment. */ - memcpy (&seeksegment, &src->segment, sizeof (GstSegment)); + seeksegment = src->segment; /* configure the seek parameters in the seeksegment. We will then have the * right values in the segment to perform the seek */ @@ -2889,7 +2889,7 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event) } /* now we did the seek and can activate the new segment values */ - memcpy (&src->segment, &seeksegment, sizeof (GstSegment)); + src->segment = seeksegment; /* if we're doing a segment seek, post a SEGMENT_START message */ if (src->segment.flags & GST_SEEK_FLAG_SEGMENT) { @@ -8774,7 +8774,7 @@ restart: break; } - memcpy (&src->out_segment, segment, sizeof (GstSegment)); + src->out_segment = *segment; if (src->clip_out_segment) { /* Only clip the output segment when the server has answered with valid