diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2021-04-10 04:40:46 +0530 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2021-09-07 00:29:48 +0100 |
commit | b1b109b5ce2d0737479e69d3c6057c334bf6dbc9 (patch) | |
tree | 9e98a17a49931e5e493e69799662286dcc44fb3b | |
parent | 1629d4fbab81f01ca8a2d63e424956a5ecce1c00 (diff) | |
download | gstreamer-plugins-good-b1b109b5ce2d0737479e69d3c6057c334bf6dbc9.tar.gz |
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/1076>
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index f5d6b708f..5c798ec5e 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -2847,7 +2847,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) { @@ -8745,7 +8745,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 |