forked from enlightenment/efl
emotion: fix shutdown of gstreamer plugin.
SVN revision: 60666
This commit is contained in:
parent
1724785989
commit
f31326c6c1
|
@ -353,13 +353,18 @@ em_shutdown(void *video)
|
||||||
if (!ev)
|
if (!ev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (ev->pipeline)
|
||||||
|
{
|
||||||
|
gst_element_set_state(ev->pipeline, GST_STATE_NULL);
|
||||||
|
gst_object_unref(ev->pipeline);
|
||||||
|
ev->pipeline = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
EINA_LIST_FREE(ev->audio_streams, astream)
|
EINA_LIST_FREE(ev->audio_streams, astream)
|
||||||
free(astream);
|
free(astream);
|
||||||
EINA_LIST_FREE(ev->video_streams, vstream)
|
EINA_LIST_FREE(ev->video_streams, vstream)
|
||||||
free(vstream);
|
free(vstream);
|
||||||
|
|
||||||
gst_deinit();
|
|
||||||
|
|
||||||
free(ev);
|
free(ev);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -670,6 +675,12 @@ em_file_close(void *video)
|
||||||
if (!ev)
|
if (!ev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (ev->eos_bus)
|
||||||
|
{
|
||||||
|
gst_object_unref(GST_OBJECT(ev->eos_bus));
|
||||||
|
ev->eos_bus = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* we clear the stream lists */
|
/* we clear the stream lists */
|
||||||
EINA_LIST_FREE(ev->audio_streams, astream)
|
EINA_LIST_FREE(ev->audio_streams, astream)
|
||||||
free(astream);
|
free(astream);
|
||||||
|
@ -683,24 +694,11 @@ em_file_close(void *video)
|
||||||
ev->eos_timer = NULL;
|
ev->eos_timer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ev->eos_bus)
|
|
||||||
{
|
|
||||||
gst_object_unref(GST_OBJECT(ev->eos_bus));
|
|
||||||
ev->eos_bus = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->metadata)
|
if (ev->metadata)
|
||||||
{
|
{
|
||||||
_free_metadata(ev->metadata);
|
_free_metadata(ev->metadata);
|
||||||
ev->metadata = NULL;
|
ev->metadata = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ev->pipeline)
|
|
||||||
{
|
|
||||||
gst_element_set_state(ev->pipeline, GST_STATE_NULL);
|
|
||||||
gst_object_unref(ev->pipeline);
|
|
||||||
ev->pipeline = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1415,6 +1413,8 @@ void
|
||||||
gstreamer_module_shutdown(void)
|
gstreamer_module_shutdown(void)
|
||||||
{
|
{
|
||||||
_emotion_module_unregister("gstreamer");
|
_emotion_module_unregister("gstreamer");
|
||||||
|
|
||||||
|
gst_deinit();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef EMOTION_STATIC_BUILD_GSTREAMER
|
#ifndef EMOTION_STATIC_BUILD_GSTREAMER
|
||||||
|
|
Loading…
Reference in New Issue