GNOME Bugzilla – Bug 704853
examples crash when starting playback
Last modified: 2013-07-26 14:11:02 UTC
Created attachment 250096 [details] [review] proposed patch crash: rogram received signal SIGSEGV, Segmentation fault. cogl_texture_get_width (texture=texture@entry=0x0) at ./cogl-texture.c:306 306 return texture->width; (gdb) bt
+ Trace 232293
Fixed in attached patch (in principle it would be nice if cogl-gst had API to query its current state, so we could get the frame information when the sink is added in case it's already playing)
I submitted a patch for cogl : http://lists.freedesktop.org/archives/cogl/2013-July/001315.html because the cogl_gst_video_sink_get_pipeline() has the inconvenient effect to also crash when the pipeline is not ready, and currently there is no API to tell you whether if a pipeline is ready, which seems like an API shortcoming. I'll ping the Cogl mailing list again to make sure the new API is added and then I'll change this piece of code use the new API. Thanks!
That works as well, just making get_pipeline return NULL seems a bit minimal though there are similar issues with the setup_pipeline api that cogl exposes (where you should only call it after the pipeline-ready signal, but don't have a way to determine if this has happened).
I just pushed a fix on master : 3d281ed0181612a07013d86c233d2efd72688e91