baseparse: push frame after fatal error
After the caps negotiation the baseparse pushes frames even if an error has ocurred.
This is something that does not happen in 1.16.3, but happens in 1.18.6 and above. I am able to reproduce it with pipelines like:
gst-launch-1.0 \
--gst-plugin-load=<private-decoder> \
filesrc location=<h265 main 10 video file> ! \
h265parse ! \
video/x-h265,stream-format=hev1,alignment=nal ! \
<private-decoder-element> ! \
fakesink
In the last loop of gst_base_parse_handle_and_push_frame
in gstbaseparse.c
if (G_UNLIKELY (!g_queue_is_empty (&parse->priv->queued_frames))) {
GstBaseParseFrame *queued_frame;
while ((queued_frame = g_queue_pop_head (&parse->priv->queued_frames))) {
gst_base_parse_push_frame (parse, queued_frame);
gst_base_parse_frame_free (queued_frame);
}
}
parse->priv->queued_frames
contains several frames after the caps negotiation, so it tries to push (and decode) all the frames in the queue even if gst_base_parse_push_frame
is returning an error.