<table cellpadding=3 cellspacing=0 border=0 width=100% bgcolor=white><tr valign=top><td width=100%><font size=2 color=black>hi all,<br> <br>i have written a simple player using playbin .<br> <br>in the int main() function ,  i create a pthread which scans for key presses , and then i call player_initialise()<br> <br>int main(int argc,char **argv)<br>{<br>      Create_keypress_scan_thread(scan_key_press); // creates a pthread for scanning user key presses<br>      player_initialise();<br>}<br> <br> <br>void *scan_key_press()<br>{<br>     <br> <br>}<br> <br> <br>void player_initialise()<br>{  <br>   gst_init(NULL,NULL);<br>   loop = g_main_loop_new(NULL,FALSE);<br>   pipeline=gst_element_new("pipeline");<br>   play=gst_element_factory_make("playbin","play");<br>   ......................<br>  set_uri();<br>  gst_element_set_state(pipeline,GST_STATE_PAUSED);<br>  g_main_loop_run(loop);<br> <br>}<BR><br>void on_playkey()<br>{<br>    
gst_element_set_state(pipeline,GST_STATE_PLAYING);<br>}<br> <br>void on_stopkey()<br>{<br>     g_main_loop_quit(loop);<br>     gst_element_set_state(pipeline,GST_STATE_READY);  // CREATES A SEGMENTATION FAULT HERE<br>     gst_object_unref(GST_OBJECT(pipeline);<br> }<BR><BR><BR> the problem is when i am playing a media file and the user presses key for stop , it goes to on_stopkey() and creates a segmentation fault at " gst_element_set_state(.....,GST_STATE_READY.) "  <br> <br> <br> <br>any ideas<br></font></td></tr></table><p><hr><font size=2 face=geneva><b>Join Excite! - <a href=http://www.excite.com target=_blank>http://www.excite.com</a></b><br>The most personalized portal on the Web!</font>