v4l2videoenc: support resolution change stream encode.

Resolution change stream transcoding will drain before send new video
frame buffer. Need encode video frame after process EOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/868>
This commit is contained in:
Bing Song 2021-02-04 13:43:17 +08:00 committed by Kevin Song
parent 61d204ab22
commit 025b43e512

View file

@ -750,8 +750,10 @@ gst_v4l2_video_enc_handle_frame (GstVideoEncoder * encoder,
/* It possible that the processing thread stopped due to an error */
if (self->output_flow != GST_FLOW_OK &&
self->output_flow != GST_FLOW_FLUSHING) {
GST_DEBUG_OBJECT (self, "Processing loop stopped with error, leaving");
self->output_flow != GST_FLOW_FLUSHING &&
self->output_flow != GST_FLOW_CUSTOM_SUCCESS) {
GST_DEBUG_OBJECT (self, "Processing loop stopped with error: %s, leaving",
gst_flow_get_name (self->output_flow));
ret = self->output_flow;
goto drop;
}