baseaudiosink: protect against ringbuffer disappearing while in a query
authorHavard Graff <havard.graff@tandberg.com>
Thu, 25 Nov 2010 16:01:04 +0000 (17:01 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 29 Dec 2010 11:29:40 +0000 (12:29 +0100)
commit60ff7c0eb475f80e8a0e767f432a55485aba0d75
tree26df28bb39cf7e9472cc72f0c818877889af1392
parent68e64770a0878d07287f4c62da65f15c108a66dd
baseaudiosink: protect against ringbuffer disappearing while in a query

Observed a case where the sink went to null-state during the query,
hence the ringbuffer-pointer was NULL, causing a crash.

Moving the ringbuffer-check code until after the query, and hold the
lock during the check and while using the spec-values. It should not matter
to the query wether the ringbuffer is present or not, and it actually
gets a time bit more time to get the ringbuffer set up in this case!

Fixes #635231
gst-libs/gst/audio/gstbaseaudiosink.c