baseparse: fix draining with less data than min frame size available
authorTim-Philipp Müller <tim@centricular.com>
Sat, 29 Oct 2016 10:17:38 +0000 (11:17 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 1 Nov 2016 18:33:56 +0000 (20:33 +0200)
commit2e278aeb7128e8732f5324ab8c8b22a47950c80a
treea99bc364b5493cb178235e82d56736bfde6e06f7
parent287645c2d7de8d1fa0c4753b479375c48c14709a
baseparse: fix draining with less data than min frame size available

baseparse would pass whatever is left in the adapter to the
subclass when draining, even if it's less than the minimum
frame size required. This is bogus, baseparse should just
discard that data then. The original intention of that code
seems to have been that if we have more data available than
the minimum required we should pass all of the data available
and not just the minimum required, which does make sense, so
we'll continue to do that in the case that more data is available.

Fixes assertions in rawvideoparse on EOS after not-negotiated with
fakesrc sizetype=random ! queue ! rawvideoparse format=rgb ! appsink caps=video/x-raw,format=I420

https://bugzilla.gnome.org/show_bug.cgi?id=773666
libs/gst/base/gstbaseparse.c