Commit 9df1027e authored by Gwenole Beauchesne's avatar Gwenole Beauchesne

vaapidecode: fix deinitialization order.

parent df720ca1
......@@ -304,17 +304,6 @@ gst_vaapidecode_create(GstVaapiDecode *decode, GstCaps *caps)
static void
gst_vaapidecode_destroy(GstVaapiDecode *decode)
{
if (decode->decoder_ready) {
gst_vaapidecode_release(decode, NULL);
g_cond_free(decode->decoder_ready);
decode->decoder_ready = NULL;
}
if (decode->decoder_mutex) {
g_mutex_free(decode->decoder_mutex);
decode->decoder_mutex = NULL;
}
if (decode->decoder) {
gst_vaapi_decoder_put_buffer(decode->decoder, NULL);
g_object_unref(decode->decoder);
......@@ -325,6 +314,17 @@ gst_vaapidecode_destroy(GstVaapiDecode *decode)
gst_caps_unref(decode->decoder_caps);
decode->decoder_caps = NULL;
}
if (decode->decoder_ready) {
gst_vaapidecode_release(decode, NULL);
g_cond_free(decode->decoder_ready);
decode->decoder_ready = NULL;
}
if (decode->decoder_mutex) {
g_mutex_free(decode->decoder_mutex);
decode->decoder_mutex = NULL;
}
}
static gboolean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment