I wrote a simple code based on gstreamer-1.0 to decode a certain file for loop using playbin, and each time the playbin created the element mpeg2dec element, the element has a new name. The name at the very first time could be "mepg2dec0", and then it will increase the suffix index to "mpeg2dec1", "mpeg2dec2", and so long, when the file is played again.
Here is some of code quotation:
do {
playbin=gst_element_factory_make("playbin", "play");
g_object_set(G_OBJECT(playbin), "uri", "file:///home/gst/Videos/1.ts", NULL);
/* add message receivers ... */
gst_element_set_state(GST_ELEMENT(playbin), GST_STATE_PAUSED);
gst_element_set_state(GST_ELEMENT(playbin), GST_STATE_PLAY);
/* wait until got EOS */
gst_element_set_state(GST_ELEMENT(playbin), GST_STATE_PAUSED);
gst_element_set_state(GST_ELEMENT(playbin), GST_STATE_NULL);
gst_object_unref(GST_ELEMENT(playbin));
} while(1);
Does this suffix index increase mean a possible memory leak of elements not freed?