diff --git a/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c b/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c index 0537b78c8d..cb3b70e337 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c @@ -624,11 +624,12 @@ gst_va_base_enc_drain (GstVideoEncoder * venc) if (ret != GST_FLOW_OK) goto error_and_purge_all; + frame_enc = NULL; + ret = _push_out_one_buffer (base); if (ret != GST_FLOW_OK) goto error_and_purge_all; - frame_enc = NULL; if (!base_class->reorder_frame (base, NULL, TRUE, &frame_enc)) { ret = GST_FLOW_ERROR; goto error_and_purge_all;