After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743912 - pulse audio sink report server is dead when doing audio track switching
pulse audio sink report server is dead when doing audio track switching
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.4.1
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-03 09:16 UTC by Jian Li
Modified: 2018-11-03 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for fixing this issue (886 bytes, patch)
2015-02-03 09:18 UTC, Jian Li
none Details | Review

Description Jian Li 2015-02-03 09:16:39 UTC
This issue is reproduced by switch two audio track with different sample rate repeatly, finally will report:" Error: Disconnected: Bad state"

It's from function gst_pulsering_is_dead().
The reason is two threads race condition, when switch two audio track with differnt caps, audio base will set new caps to pulsesink, then two threads will have race condition.

The first thread is gst_pulsesink_get_time(), the other is gst_audio_base_sink_setcaps(). In gst_audio_base_sink_setcaps, it will release audio ring buffer, which will finally release pulse audio stream. But in gst_pulsesink_get_time(), it will call gst_pulsering_is_dead() to check if pbuf->stream is still valid, if invalid will report server is dead.

So need to check if pa stream is still alive in gst_pulsesink_get_time().

Patch is attached.
Comment 1 Jian Li 2015-02-03 09:18:25 UTC
Created attachment 295998 [details] [review]
patch for fixing this issue
Comment 2 Jian Li 2015-02-11 02:37:43 UTC
I also found the same issue in GST-1.2.3, this is not regression in GST-1.4.1. Can you help review if this patch is correct?
Comment 3 GStreamer system administrator 2018-11-03 14:57:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/155.