summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b164a82)
raw | patch | inline | side by side (parent: b164a82)
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | |
Tue, 15 Feb 2011 13:42:58 +0000 (14:42 +0100) | ||
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | |
Tue, 15 Feb 2011 13:51:20 +0000 (14:51 +0100) |
... which could lead to a premature eos being reported downstream,
rather than a successful partial read which would result when
performed directly on e.g. basesrc.
rather than a successful partial read which would result when
performed directly on e.g. basesrc.
plugins/elements/gstqueue2.c | patch | blob | history |
index 956f2b91a259bce8a0a6d890f11dcb88d415666b..ab55cbbc2259d577d044fe291e29ac274738dc32 100644 (file)
goto out_unexpected;
}
+ if (G_UNLIKELY (offset + length > queue->upstream_size)) {
+ gst_queue2_update_upstream_size (queue);
+ if (queue->upstream_size > 0 && offset + length >= queue->upstream_size) {
+ length = queue->upstream_size - offset;
+ GST_DEBUG_OBJECT (queue, "adjusting length downto %d", length);
+ }
+ }
+
/* FIXME - function will block when the range is not yet available */
ret = gst_queue2_create_read (queue, offset, length, buffer);
GST_QUEUE2_MUTEX_UNLOCK (queue);