mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-03 10:43:55 +00:00
decoder: delegate surface size check to VA context reset.
Now that the surface pool is reference counted in the surface proxy wrapper, we can safely ignore surface size checks in gst_vaapi_decoder_ensure_context(). Besides, this check is already performed in gst_vaapi_context_reset_full().
This commit is contained in:
parent
e22a863084
commit
6e82da1e93
1 changed files with 0 additions and 13 deletions
|
@ -866,19 +866,6 @@ gst_vaapi_decoder_ensure_context(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
GstVaapiDecoderPrivate * const priv = decoder->priv;
|
GstVaapiDecoderPrivate * const priv = decoder->priv;
|
||||||
GstVideoCodecState * const codec_state = priv->codec_state;
|
|
||||||
gboolean size_changed;
|
|
||||||
|
|
||||||
size_changed = codec_state->info.width != cip->width ||
|
|
||||||
codec_state->info.height != cip->height;
|
|
||||||
|
|
||||||
/* Create a new context if the requested size for surfaces changed
|
|
||||||
* because we need to keep the context underlying surface pool
|
|
||||||
* until all surfaces are released */
|
|
||||||
if (size_changed) {
|
|
||||||
gst_vaapi_decoder_set_picture_size(decoder, cip->width, cip->height);
|
|
||||||
g_clear_object(&priv->context);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (priv->context) {
|
if (priv->context) {
|
||||||
if (!gst_vaapi_context_reset_full(priv->context, cip))
|
if (!gst_vaapi_context_reset_full(priv->context, cip))
|
||||||
|
|
Loading…
Reference in a new issue