mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 14:38:48 +00:00
libs: decoder: h265: implement reset() callback
and remove create() and destroy() and use g_clear_pointer for dpb structure https://bugzilla.gnome.org/show_bug.cgi?id=796308
This commit is contained in:
parent
7a9f7f09c7
commit
3dbddfa682
1 changed files with 9 additions and 4 deletions
|
@ -987,8 +987,7 @@ gst_vaapi_decoder_h265_destroy (GstVaapiDecoder * base_decoder)
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
gst_vaapi_decoder_h265_close (decoder);
|
gst_vaapi_decoder_h265_close (decoder);
|
||||||
g_free (priv->dpb);
|
g_clear_pointer (&priv->dpb, g_free);
|
||||||
priv->dpb = NULL;
|
|
||||||
priv->dpb_count = priv->dpb_size_max = priv->dpb_size = 0;
|
priv->dpb_count = priv->dpb_size_max = priv->dpb_size = 0;
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (priv->pps); i++)
|
for (i = 0; i < G_N_ELEMENTS (priv->pps); i++)
|
||||||
|
@ -1018,6 +1017,13 @@ gst_vaapi_decoder_h265_create (GstVaapiDecoder * base_decoder)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GstVaapiDecoderStatus
|
||||||
|
gst_vaapi_decoder_h265_reset (GstVaapiDecoder * base_decoder)
|
||||||
|
{
|
||||||
|
gst_vaapi_decoder_h265_destroy (base_decoder);
|
||||||
|
gst_vaapi_decoder_h265_create (base_decoder);
|
||||||
|
return GST_VAAPI_DECODER_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fill_profiles (GstVaapiProfile profiles[16], guint * n_profiles_ptr,
|
fill_profiles (GstVaapiProfile profiles[16], guint * n_profiles_ptr,
|
||||||
|
@ -3052,8 +3058,7 @@ gst_vaapi_decoder_h265_class_init (GstVaapiDecoderH265Class * klass)
|
||||||
|
|
||||||
object_class->finalize = gst_vaapi_decoder_h265_finalize;
|
object_class->finalize = gst_vaapi_decoder_h265_finalize;
|
||||||
|
|
||||||
decoder_class->create = gst_vaapi_decoder_h265_create;
|
decoder_class->reset = gst_vaapi_decoder_h265_reset;
|
||||||
decoder_class->destroy = gst_vaapi_decoder_h265_destroy;
|
|
||||||
decoder_class->parse = gst_vaapi_decoder_h265_parse;
|
decoder_class->parse = gst_vaapi_decoder_h265_parse;
|
||||||
decoder_class->decode = gst_vaapi_decoder_h265_decode;
|
decoder_class->decode = gst_vaapi_decoder_h265_decode;
|
||||||
decoder_class->start_frame = gst_vaapi_decoder_h265_start_frame;
|
decoder_class->start_frame = gst_vaapi_decoder_h265_start_frame;
|
||||||
|
|
Loading…
Reference in a new issue