mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
playsink: Reset ts_offset field when freeing chain
Otherwise we would end up with a bogus ->audiochain->ts_offset field which would cause segfaults/assertions when trying to modify the 'ts-offset' property in update_av_offset(). Was easy to trigger when using a list of audio+video files mixed with video-only files in totem.
This commit is contained in:
parent
aef6123172
commit
97e14fda28
1 changed files with 3 additions and 0 deletions
|
@ -2219,6 +2219,7 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
|
|||
disconnect_chain (playsink->audiochain, playsink);
|
||||
playsink->audiochain->volume = NULL;
|
||||
playsink->audiochain->mute = NULL;
|
||||
playsink->audiochain->ts_offset = NULL;
|
||||
free_chain ((GstPlayChain *) playsink->audiochain);
|
||||
playsink->audiochain = NULL;
|
||||
playsink->volume_changed = playsink->mute_changed = FALSE;
|
||||
|
@ -2256,6 +2257,7 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
|
|||
disconnect_chain (playsink->audiochain, playsink);
|
||||
playsink->audiochain->volume = NULL;
|
||||
playsink->audiochain->mute = NULL;
|
||||
playsink->audiochain->ts_offset = NULL;
|
||||
}
|
||||
add_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
||||
activate_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
||||
|
@ -2941,6 +2943,7 @@ gst_play_sink_change_state (GstElement * element, GstStateChange transition)
|
|||
disconnect_chain (playsink->audiochain, playsink);
|
||||
playsink->audiochain->volume = NULL;
|
||||
playsink->audiochain->mute = NULL;
|
||||
playsink->audiochain->ts_offset = NULL;
|
||||
}
|
||||
ret = GST_STATE_CHANGE_SUCCESS;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue