crash during gst_element_set_state

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

crash during gst_element_set_state

Vincent Meserette
Hi all,

I constructed a pipeline using playbin to play mp3 files.
All works well, but sometimes I have a crash at the end of the paying when I try to unref the playbin element.

Here is the piece of code I used to unref playbin :

GstStateChangeReturn ret = gst_element_set_state (playbinElement, GST_STATE_NULL); // playbinElement is a pointer on the playbin element (GstElement *playbinElement = gst_element_factory_make ("playbin", "playElement"))

GstClockTime timeOut = 2000000000; // in nano seconds
if (ret==GST_STATE_CHANGE_ASYNC) {
printf("set state async\n");
ret = gst_element_get_state(
playbinElement,NULL,NULL,timeOut);
}
if (ret==GST_STATE_CHANGE_SUCCESS) {
printf("set state done\n");
gst_object_unref(GST_OBJECT (
playbinElement));
printf("unref done\n");
}
else {
printf("set state failed\n");
}


And I have the following backtrace :

set state done
unref done

(<unknown>:4379): GStreamer-CRITICAL *: gst_element_set_state: assertion `GST_IS_ELEMENT (element)' failed
(<unknown>:4379): GStreamer-CRITICAL *
:
Trying to dispose element play, but it is in PAUSED instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
(<unknown>:4379): GStreamer-CRITICAL *:
Trying to dispose element preroll_audio_src0, but it is in PAUSED instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
GThread-ERROR *
: file gthread-posix.c: line 171 (g_mutex_free_posix_impl): error 'Device or resource busy' during 'pthread_mutex_destroy ((pthread_mutex_t *) mutex)'
aborting...
Aborted

Does someone know from where could come the problem ?

Thanks in advance

Regards

Vincent




_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel