From 025b43e512c3aadd62096bed07c6e2e79b73e1b3 Mon Sep 17 00:00:00 2001 From: Bing Song Date: Thu, 4 Feb 2021 13:43:17 +0800 Subject: [PATCH] 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: --- sys/v4l2/gstv4l2videoenc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/v4l2/gstv4l2videoenc.c b/sys/v4l2/gstv4l2videoenc.c index 117d140..bc184f0 100644 --- a/sys/v4l2/gstv4l2videoenc.c +++ b/sys/v4l2/gstv4l2videoenc.c @@ -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; } -- 2.7.4