GNOME Bugzilla – Bug 796802
Problem calling `ges_track_update_restriction_caps` after `ges_video_track_new`
Last modified: 2018-07-12 19:52:56 UTC
This is related to a prior bug (740726) which apparently never got fixed for video tracks (it was only fixed for audio tracks). The following code will cause all kinds of errors: GESTrack* videoTrack = ges_video_track_new() GstCaps* caps = gst_caps_new_simple("video/x-raw", "width", 100, "height", 100, nullptr); ges_track_update_restriction_caps(gesVideoTrack, caps) The errors: (whatever.exe:5788): GStreamer-CRITICAL **: gst_mini_object_copy: assertion 'mini_object != NULL' failed (whatever.exe:5788): GStreamer-CRITICAL **: gst_caps_get_size: assertion 'GST_IS_CAPS (caps)' failed (whatever.exe:5788): GStreamer-CRITICAL **: gst_caps_append_structure: assertion 'GST_IS_CAPS (caps)' failed ** (whatever.exe:5788): CRITICAL **: ges_track_set_restriction_caps: assertion 'GST_IS_CAPS (caps)' failed To fix these errors, the method `ges_track_update_restriction_caps` should check to see whether restriction caps already exist. If not, it should call `ges_track_set_restriction_caps`.
Sorry, I forgot G_TYPE_INT from the code snippet. Here is the correct snippet: GESTrack* videoTrack = ges_video_track_new() GstCaps* caps = gst_caps_new_simple("video/x-raw", "width", G_TYPE_INT, 100, "height", G_TYPE_INT, 100, nullptr); ges_track_update_restriction_caps(gesVideoTrack, caps)
Created attachment 373010 [details] [review] track: Set restriction caps when update_restriction before caps being set And stop leaking intermediary restriction caps.
Review of attachment 373010 [details] [review]: looks fine to me
Review of attachment 373010 [details] [review]: Looks good
Attachment 373010 [details] pushed as ab22f33 - track: Set restriction caps when update_restriction before caps being set