core/audio: Don't clear NULL audio_pipeline state

Doing so can cause a deadlock somewhere deep inside gstreamer.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2018-02-20 15:37:14 -05:00
parent 1940a31a77
commit d96e8ca1ca
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ static struct track *__audio_load(struct track *track, unsigned int flags)
audio_track = track;
path = track_path(track);
gst_element_set_state(audio_pipeline, GST_STATE_READY);
if (audio_cur_state() != GST_STATE_NULL)
gst_element_set_state(audio_pipeline, GST_STATE_READY);
g_object_set(G_OBJECT(audio_source), "location", path, NULL);
gst_element_set_state(audio_pipeline, flags & LOAD_PLAYING ?
GST_STATE_PLAYING : GST_STATE_PAUSED);