Re: [pulseaudio-tickets] [PulseAudio] #166: Various asserts in pulseaudio that result in mplayer crash

2008-06-21 Thread PulseAudio
#166: Various asserts in pulseaudio that result in mplayer crash
---+
  Reporter:  Stax  |   Owner:  lennart
  Type:  defect|  Status:  closed 
  Priority:  normal|   Milestone:  0.9.11 
 Component:  libpulse  |Severity:  major  
Resolution:  fixed |Keywords: 
---+
Changes (by lennart):

  * status:  new = closed
  * resolution:  = fixed

-- 
Ticket URL: http://pulseaudio.org/ticket/166#comment:5
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


Re: [pulseaudio-tickets] [PulseAudio] #166: Various asserts in pulseaudio that result in mplayer crash

2008-02-15 Thread PulseAudio
#166: Various asserts in pulseaudio that result in mplayer crash
---+
  Reporter:  Stax  |   Owner:  lennart
  Type:  defect|  Status:  new
  Priority:  normal|   Milestone: 
 Component:  libpulse  |Severity:  major  
Resolution:|Keywords: 
---+
Comment (by lennart):

 If any of the pa_context_xxx() or pa_stream_xxx() functions are called
 from a different thread than the main loop thread while it is running than
 this has to be protected with _lock() and _unlock().

 Hence, yes, you do have a race condition here. A bug in MPlayer, not in
 PA.

-- 
Ticket URL: http://pulseaudio.org/ticket/166#comment:3
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


Re: [pulseaudio-tickets] [PulseAudio] #166: Various asserts in pulseaudio that result in mplayer crash

2007-12-13 Thread PulseAudio
#166: Various asserts in pulseaudio that result in mplayer crash
---+
  Reporter:  Stax  |   Owner:  lennart
  Type:  defect|  Status:  new
  Priority:  normal|   Milestone: 
 Component:  libpulse  |Severity:  major  
Resolution:|Keywords: 
---+
Comment (by Frank Mehnert):

 There is a bug in the ao_pulse.c code in the mplayer repository. The
 `pa_stream_write()` call has to be protected by the mainloop lock from the
 mainloop. The reason is that `pa_stream_write()` is not called from a
 mainloop callback. However, I'm not entirely sure about pa_stream_trigger.
 Perhaps the main developers could have a short note here. The attached
 patch works fine for me:
 {{{
 --- ao_pulse.c  (revision 25386)
 +++ ao_pulse.c  (working copy)
 @@ -251,11 +251,16 @@
  /** Play the specified data to the pulseaudio server */
  static int play(void* data, int len, int flags) {
  if (len) {
 -if (pa_stream_write(stream, data, len, NULL, 0, PA_SEEK_RELATIVE)
  0) {
 +int rc;
 +pa_threaded_mainloop_lock(mainloop);
 +rc = pa_stream_write(stream, data, len, NULL, 0,
 PA_SEEK_RELATIVE);
 +pa_threaded_mainloop_unlock(mainloop);
 +if (rc  0) {
  GENERIC_ERR_MSG(context, pa_stream_write() failed);
  return -1;
  }
  } else {
 +pa_threaded_mainloop_lock(mainloop);
  pa_operation *o = pa_stream_trigger(stream, NULL, NULL);
  if (!o) {
  GENERIC_ERR_MSG(context, pa_stream_trigger() failed);
 @@ -263,6 +268,7 @@
  }
  /* We don't wait for this operation to complete */
  pa_operation_unref(o);
 +pa_threaded_mainloop_unlock(mainloop);
  }
  return len;
  }
 }}}

-- 
Ticket URL: http://www.pulseaudio.org/ticket/166#comment:2
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets