After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704853 - examples crash when starting playback
examples crash when starting playback
Status: RESOLVED FIXED
Product: clutter-gst
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-gst-maint
clutter-gst-maint
Depends on:
Blocks:
 
 
Reported: 2013-07-25 10:42 UTC by Sjoerd Simons
Modified: 2013-07-26 14:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.14 KB, patch)
2013-07-25 10:42 UTC, Sjoerd Simons
none Details | Review

Description Sjoerd Simons 2013-07-25 10:42:16 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
  • #0 cogl_texture_get_width
    at ./cogl-texture.c line 306
  • #1 clutter_gst_frame_new
    at ./clutter-gst-types.c line 39
  • #2 update_frame
    at ./clutter-gst-content.c line 93
  • #3 content_set_sink
    at ./clutter-gst-content.c line 194
  • #4 g_type_create_instance
    at /tmp/buildd/glib2.0-2.36.3/./gobject/gtype.c line 1917
  • #5 g_object_constructor
    at /tmp/buildd/glib2.0-2.36.3/./gobject/gobject.c line 1855
  • #6 g_object_newv
    at /tmp/buildd/glib2.0-2.36.3/./gobject/gobject.c line 1638
  • #7 g_object_new
    at /tmp/buildd/glib2.0-2.36.3/./gobject/gobject.c line 1548
  • #8 clutter_gst_content_new
    at ./clutter-gst-content.c line 412
  • #9 main
    at video-content.c line 150

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)
Comment 1 Lionel Landwerlin 2013-07-25 10:50:43 UTC
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!
Comment 2 Sjoerd Simons 2013-07-25 11:10:54 UTC
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).
Comment 3 Lionel Landwerlin 2013-07-26 14:11:02 UTC
I just pushed a fix on master : 3d281ed0181612a07013d86c233d2efd72688e91