baseparse: Use buffer from short reads instead of pulling again
authorKimTaeSoo <myrandy1@gmail.com>
Wed, 14 Nov 2018 15:17:09 +0000 (00:17 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 28 Nov 2018 15:38:58 +0000 (17:38 +0200)
commitbf1979e55fc525f4e26354fa03edf9bbe41b54c1
treee2f6fc1164856674ac04b95505814bdb62ae6c82
parent9f5e65f0a2c26e407faa62dc47a623cb145347b6
baseparse: Use buffer from short reads instead of pulling again

baseparse internally uses a 64kb buffer for pulling data from upstream.
If a 64kb pull is failing with a short read, it would previously pull
again the requested size.

Doing so is not only inefficient but also seems to cause problems with
some elements (rawvideoparse) where the second pull would fail with EOS.

Short reads are only allowed in GStreamer at EOS.

Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/294
libs/gst/base/gstbaseparse.c