mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
gst-libs/gst/audio/gstringbuffer.c: If we are reading too slowly, jump forward in the ringbuffer instead of blocking.
Original commit message from CVS: * gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_read): If we are reading too slowly, jump forward in the ringbuffer instead of blocking.
This commit is contained in:
parent
0118f331c3
commit
c7dc33e495
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-11-23 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_read):
|
||||||
|
If we are reading too slowly, jump forward in the ringbuffer
|
||||||
|
instead of blocking.
|
||||||
|
|
||||||
2005-11-23 Jan Schmidt <thaytan@mad.scientist.com>
|
2005-11-23 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* ext/libvisual/visual.c: (gst_visual_src_setcaps), (get_buffer),
|
* ext/libvisual/visual.c: (gst_visual_src_setcaps), (get_buffer),
|
||||||
|
|
|
@ -1183,6 +1183,12 @@ gst_ring_buffer_read (GstRingBuffer * buf, guint64 sample, guchar * data,
|
||||||
if (diff > 0 && diff < segtotal)
|
if (diff > 0 && diff < segtotal)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* flush if diff has grown bigger than ringbuffer */
|
||||||
|
if (diff >= segtotal) {
|
||||||
|
gst_ring_buffer_clear_all (buf);
|
||||||
|
buf->segdone = readseg;
|
||||||
|
}
|
||||||
|
|
||||||
/* else we need to wait for the segment to become readable. */
|
/* else we need to wait for the segment to become readable. */
|
||||||
if (!wait_segment (buf))
|
if (!wait_segment (buf))
|
||||||
goto not_started;
|
goto not_started;
|
||||||
|
|
Loading…
Reference in a new issue