summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2021-04-10 04:40:46 +0530
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-04-13 14:30:54 +0000
commit99ee5fb2d96ee5eaa1d81a05a968a2c92051bde6 (patch)
tree3a8558086b0fb9b776f14e3b0af55a2ecf69196d
parent52ead086d9ad9baf0356c031b0075dc944d2b957 (diff)
rtspsrc: Just assign the segment instead of memcpy
Assignments copy by value, we don't need to memcpy... Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/940>
-rw-r--r--gst/rtsp/gstrtspsrc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 51a70b73b..9f5c3f750 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