program crashes after g_main_loop_run()

leon dudi.reuveni at comm-it.co.il
Sun Apr 6 04:16:46 PDT 2014


cheers!

Im using appsrc in my code (visual studio) and I have two pipelines-
transmitter and receiver.

I checked the data and the size of the data before the commnd- 
gst_app_src_push_buffer()
and it seems to be fine
also,  the return value is o.k- GST_FLOW_OK.

*this is pipeline 1:*

   app->src = (GstAppSrc*)gst_element_factory_make("appsrc", "mysrc");
   app->sink = gst_element_factory_make ("udpsink", "sink"); 
   g_object_set(G_OBJECT(app->sink),"port",5000,NULL);

   gst_bin_add_many(GST_BIN(app->pipeline1), (GstElement*)app->src,
app->sink, NULL);
 
    if(!gst_element_link((GstElement*)app->src, app->sink)){
    g_warning("failed to link src and sink");
    }

*this is pipeline 2:*

   app->pipeline2 = gst_parse_launch( " udpsrc uri=udp://localhost:5000 !
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)96 ! queue2 use-buffering=TRUE,
max-size-buffers=0 ! rtpjitterbuffer latency=1000 do-lost=TRUE ! decodebin2
! autovideosink", NULL);

the pipelines works fine in other project.

*callbacks to appsrc:*

  g_signal_connect(app->src, "need-data", G_CALLBACK(start_feed), app);
  g_signal_connect(app->src, "enough-data", G_CALLBACK(stop_feed), app);

* Start playing:* 

 gst_element_set_state (app->pipeline2, GST_STATE_PLAYING);
 state_ret = gst_element_set_state((GstElement*)app->pipeline1,
GST_STATE_PLAYING);
 g_warning("set state returned %d\n", state_ret);

 app->loop = g_main_loop_new(NULL, FALSE);
 g_main_loop_run(app->loop);


the program crashes right after the command:

   g_main_loop_run(app->loop);


with the error:

    Windows has triggered a breakpoint in project 1.0.exe.

    This may be due to a corruption of the heap, which indicates a bug in
project 1.0.exe or any of the DLLs it  has loaded.

    This may also be due to the user pressing F12 while project 1.0.exe has
focus.

    The output window may have more diagnostic information.



if someone know what is wrong here it will be very helpful.
thanks in advance!

Leon.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/program-crashes-after-g-main-loop-run-tp4666311.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list