gstreamer/plugins/elements
Tim-Philipp Müller 2fe8ebaae6 queue2: fix possible data corruption in ring buffer mode when seeking
Fix race that could cause data corruption when seeking in ring buffer
mode.

In perform_seek_to_offset(), called from the demuxer's pull_range
request, we drop the lock, tell upstream (usually a http source)
to seek to a different offset, then re-acquire the lock before we
do things to the ranges. However, between us sending the seek event
and re-acquiring the lock, the source thread might already have pushed
some data and moved along the range's writing_pos beyond the seek
offset. In that case we don't want to set the writing position back
to the requested seek position, as it would cause data to be written
to the wrong offset in the file or ring buffer.

Reproducible doing seek-emulated fast-forward/backward on 006653.

Conflicts:
	plugins/elements/gstqueue2.c
2012-09-12 12:59:50 +01:00
..
.gitignore ignore more 2005-06-17 09:12:33 +00:00
gstcapsfilter.c elements: Use gst_pad_set_caps() and don't ignore its return value 2012-06-08 15:45:38 +02:00
gstcapsfilter.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstdataqueue.c plugins: embed GstAueueArray in dataqueue struct as well 2012-07-14 20:33:30 +01:00
gstdataqueue.h plugins: embed GstAueueArray in dataqueue struct as well 2012-07-14 20:33:30 +01:00
gstelements.c plugins: don't use one-time array in plugin_init 2012-07-14 20:28:54 +01:00
gstfakesink.c plugins: print flags better 2012-07-23 13:40:38 +02:00
gstfakesink.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstfakesrc.c plugins: print flags better 2012-07-23 13:40:38 +02:00
gstfakesrc.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstfdsink.c fdsink.c: fix G_OS_WIN32 #ifdef 2012-07-02 12:05:50 +01:00
gstfdsink.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstfdsrc.c Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
gstfdsrc.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstfilesink.c Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
gstfilesink.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstfilesrc.c basesrc: Add default handler for URI query in GstURIHandler subclasses 2012-07-31 17:26:37 +02:00
gstfilesrc.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstfunnel.c gstfunnel: avoid access of freed pad 2012-06-14 14:10:22 +01:00
gstfunnel.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstidentity.c plugins: print flags better 2012-07-23 13:40:38 +02:00
gstidentity.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstinputselector.c ghostpad: Make some debugging more verbose 2012-08-31 06:25:37 -07:00
gstinputselector.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstmultiqueue.c Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
gstmultiqueue.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstoutputselector.c Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
gstoutputselector.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstqueue.c queue: answer SCHEDULING query 2012-07-18 09:15:51 +01:00
gstqueue.h queue: embed GstQueueArray structure 2012-07-14 20:26:23 +01:00
gstqueue2.c queue2: fix possible data corruption in ring buffer mode when seeking 2012-09-12 12:59:50 +01:00
gstqueue2.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstqueuearray.c plugins: add init/clear functions to GstQueueArray 2012-07-14 19:38:39 +01:00
gstqueuearray.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gsttee.c tee: remove unimplemented has-sink-loop property 2012-07-06 11:26:14 +01:00
gsttee.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gsttypefindelement.c baseparse, typefind: only activate in pull mode if upstream is seekable 2012-09-11 01:40:53 +01:00
gsttypefindelement.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
gstvalve.c Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
gstvalve.h plugins: sprinkle some more G_GNUC_INTERNAL 2012-07-14 20:05:53 +01:00
Makefile.am base: make GstQueueArray private to coreelements for now 2012-07-14 19:36:02 +01:00