mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
event: Require writable events for setting the running-time-offset and sequence number
Otherwise multiple code paths with the same event could change the values on each other. https://bugzilla.gnome.org/show_bug.cgi?id=796615
This commit is contained in:
parent
6dba0d91ed
commit
1908daf29c
1 changed files with 2 additions and 0 deletions
|
@ -449,6 +449,7 @@ gst_event_set_seqnum (GstEvent * event, guint32 seqnum)
|
|||
{
|
||||
g_return_if_fail (GST_IS_EVENT (event));
|
||||
g_return_if_fail (seqnum != GST_SEQNUM_INVALID);
|
||||
g_return_if_fail (gst_event_is_writable (event));
|
||||
|
||||
GST_EVENT_SEQNUM (event) = seqnum;
|
||||
}
|
||||
|
@ -497,6 +498,7 @@ void
|
|||
gst_event_set_running_time_offset (GstEvent * event, gint64 offset)
|
||||
{
|
||||
g_return_if_fail (GST_IS_EVENT (event));
|
||||
g_return_if_fail (gst_event_is_writable (event));
|
||||
|
||||
((GstEventImpl *) event)->running_time_offset = offset;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue