mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-06 14:32:31 +00:00
libs: decoder: vc1: implement reset() callback
remove destroy() and create() callbacks use g_clear_pointer for rbdu_buffer no cast for enum https://bugzilla.gnome.org/show_bug.cgi?id=796308
This commit is contained in:
parent
5b3f6eb285
commit
2b207a47cb
1 changed files with 11 additions and 5 deletions
|
@ -170,8 +170,7 @@ gst_vaapi_decoder_vc1_destroy (GstVaapiDecoder * base_decoder)
|
||||||
gst_vaapi_decoder_vc1_close (decoder);
|
gst_vaapi_decoder_vc1_close (decoder);
|
||||||
|
|
||||||
if (priv->rbdu_buffer) {
|
if (priv->rbdu_buffer) {
|
||||||
g_free (priv->rbdu_buffer);
|
g_clear_pointer (&priv->rbdu_buffer, g_free);
|
||||||
priv->rbdu_buffer = NULL;
|
|
||||||
priv->rbdu_buffer_size = 0;
|
priv->rbdu_buffer_size = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,12 +185,20 @@ gst_vaapi_decoder_vc1_create (GstVaapiDecoder * base_decoder)
|
||||||
priv->size_changed = priv->profile_changed =
|
priv->size_changed = priv->profile_changed =
|
||||||
priv->closed_entry = priv->broken_link = FALSE;
|
priv->closed_entry = priv->broken_link = FALSE;
|
||||||
|
|
||||||
priv->profile = (GstVaapiProfile) 0;
|
priv->profile = GST_VAAPI_PROFILE_UNKNOWN;
|
||||||
priv->rndctrl = 0;
|
priv->rndctrl = 0;
|
||||||
priv->width = priv->height = 0;
|
priv->width = priv->height = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GstVaapiDecoderStatus
|
||||||
|
gst_vaapi_decoder_vc1_reset (GstVaapiDecoder * base_decoder)
|
||||||
|
{
|
||||||
|
gst_vaapi_decoder_vc1_destroy (base_decoder);
|
||||||
|
gst_vaapi_decoder_vc1_create (base_decoder);
|
||||||
|
return GST_VAAPI_DECODER_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
static GstVaapiDecoderStatus
|
static GstVaapiDecoderStatus
|
||||||
ensure_context (GstVaapiDecoderVC1 * decoder)
|
ensure_context (GstVaapiDecoderVC1 * decoder)
|
||||||
{
|
{
|
||||||
|
@ -1445,8 +1452,7 @@ gst_vaapi_decoder_vc1_class_init (GstVaapiDecoderVC1Class * klass)
|
||||||
|
|
||||||
object_class->finalize = gst_vaapi_decoder_vc1_finalize;
|
object_class->finalize = gst_vaapi_decoder_vc1_finalize;
|
||||||
|
|
||||||
decoder_class->create = gst_vaapi_decoder_vc1_create;
|
decoder_class->reset = gst_vaapi_decoder_vc1_reset;
|
||||||
decoder_class->destroy = gst_vaapi_decoder_vc1_destroy;
|
|
||||||
decoder_class->parse = gst_vaapi_decoder_vc1_parse;
|
decoder_class->parse = gst_vaapi_decoder_vc1_parse;
|
||||||
decoder_class->decode = gst_vaapi_decoder_vc1_decode;
|
decoder_class->decode = gst_vaapi_decoder_vc1_decode;
|
||||||
decoder_class->start_frame = gst_vaapi_decoder_vc1_start_frame;
|
decoder_class->start_frame = gst_vaapi_decoder_vc1_start_frame;
|
||||||
|
|
Loading…
Reference in a new issue