program crashes after g_main_loop_run()

Sebastian Dröge sebastian at centricular.com
Sun Apr 6 05:37:47 PDT 2014


On So, 2014-04-06 at 04:16 -0700, leon wrote:
> 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!

Please run your application in a debugger to get a backtrace of the
crash. Without this there's only guessing.

On Windows you unfortunately can't use the Visual Studio debugger but
have to use gdb for the time being.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140406/db2faa44/attachment.sig>


More information about the gstreamer-devel mailing list