qsvencoder: Do not query again if previous call succeeded

Don't need to query multiple times

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2730>
This commit is contained in:
Seungha Yang 2022-07-08 19:05:19 +09:00 committed by GStreamer Marge Bot
parent 6cc6494287
commit 4f90e9b561

View file

@ -1060,9 +1060,8 @@ gst_qsv_encoder_init_encode_session (GstQsvEncoder * self)
GST_INFO_OBJECT (self, "LowPower - OFF returned %d (%s)", GST_INFO_OBJECT (self, "LowPower - OFF returned %d (%s)",
QSV_STATUS_ARGS (status)); QSV_STATUS_ARGS (status));
param.mfx.LowPower = MFX_CODINGOPTION_UNKNOWN; param.mfx.LowPower = MFX_CODINGOPTION_UNKNOWN;
status = encoder_handle->Query (&param, &param);
} }
status = encoder_handle->Query (&param, &param);
QSV_CHECK_STATUS (self, status, MFXVideoENCODE::Query); QSV_CHECK_STATUS (self, status, MFXVideoENCODE::Query);
status = encoder_handle->QueryIOSurf (&param, &alloc_request); status = encoder_handle->QueryIOSurf (&param, &alloc_request);