baseparse: fix draining with less data than min frame size available
@tpm
Submitted by Tim Müller Link to original bug (#773666)
Description
Created attachment 338771
baseparse: fix draining with less data than min frame size available
Came across this when debugging some issues with rawvideoparse in a not-negotiated flow error scenario:
gst-launch-1.0 fakesrc sizetype=random ! queue ! rawvideoparse format=rgb ! appsink caps=video/x-raw,format=I420
First it would not return the flow error properly. After fixing that it would hit an assert in rawvideoparse
gstrawbaseparse.c:519:gst_raw_base_parse_handle_frame: assertion failed: (in_size >= frame_size)
Reason is that basesrc sends an EOS in response to the flow error, which makes basesrc drain, and the draining code passes less than the configured minimum framesize to the rawvideoparse subclass, which is unexpected.
Not tested the patch a lot, so saving it for now.
Patch 338771, "baseparse: fix draining with less data than min frame size available":
0001-baseparse-fix-draining-with-less-data-than-min-frame.patch