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 796326 - waylandsink: don't check if buffer used by compositor when attach
waylandsink: don't check if buffer used by compositor when attach
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-05-22 06:58 UTC by Haihua Hu
Modified: 2018-11-03 14:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
waylandsink: don't check if buffer used by compositor when attach (855 bytes, patch)
2018-05-22 06:59 UTC, Haihua Hu
none Details | Review
wayland/wlbuffer: just return if used_by_compositor is true when attach (889 bytes, patch)
2018-10-18 07:38 UTC, Haihua Hu
needs-work Details | Review
wayland/wlbuffer: just return if used_by_compositor is true when attach (V2) (1.06 KB, patch)
2018-10-19 02:50 UTC, Haihua Hu
none Details | Review

Description Haihua Hu 2018-05-22 06:58:48 UTC
when sink do resize, sink will attach last buffer again.
Comment 1 Haihua Hu 2018-05-22 06:59:24 UTC
Created attachment 372326 [details] [review]
waylandsink: don't check if buffer used by compositor when attach
Comment 2 Nicolas Dufresne (ndufresne) 2018-05-22 14:44:31 UTC
Review of attachment 372326 [details] [review]:

Would be nice to show in your comment message your analyses that explain that this case is legal and is not a bug elswhere in the resize code.
Comment 3 Haihua Hu 2018-10-18 07:36:44 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #2)
> Review of attachment 372326 [details] [review] [review]:
> 
> Would be nice to show in your comment message your analyses that explain
> that this case is legal and is not a bug elswhere in the resize code.

Hi, sorry for late response. We found we still need check this boolean. But could we not use g_return_if_fail, Because it will report error log.

Can we just add some check and return:

-  g_return_if_fail (self->used_by_compositor == FALSE);
+  if (self->used_by_compositor) {
+    GST_DEBUG_OBJECT (self, "buffer used by compositor %p", self->gstbuffer);
+    return;
+  }
Comment 4 Haihua Hu 2018-10-18 07:38:02 UTC
Created attachment 373957 [details] [review]
wayland/wlbuffer: just return if used_by_compositor is true when attach
Comment 5 Nicolas Dufresne (ndufresne) 2018-10-18 13:17:43 UTC
Review of attachment 373957 [details] [review]:

There is description in the commit message.
Comment 6 Haihua Hu 2018-10-19 02:20:12 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #5)
> Review of attachment 373957 [details] [review] [review]:
> 
> There is description in the commit message.

? description for what? I mean could we use the update patch check used_by_compositor instead of g_retrun_if_fail
Comment 7 Haihua Hu 2018-10-19 02:20:24 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #5)
> Review of attachment 373957 [details] [review] [review]:
> 
> There is description in the commit message.

? description for what? I mean could we use the update patch check used_by_compositor instead of g_retrun_if_fail
Comment 8 Nicolas Dufresne (ndufresne) 2018-10-19 02:34:54 UTC
I means to write "this is no description", meant to be a code review comment. Please add a description to your commits that explains why you make this change. The original author thought it was a programming error, so you should explain why it's not.
Comment 9 Haihua Hu 2018-10-19 02:50:56 UTC
Created attachment 373968 [details] [review]
wayland/wlbuffer: just return if used_by_compositor is true when attach (V2)
Comment 10 Haihua Hu 2018-10-19 02:51:16 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #8)
> I means to write "this is no description", meant to be a code review
> comment. Please add a description to your commits that explains why you make
> this change. The original author thought it was a programming error, so you
> should explain why it's not.

Update.
Comment 11 GStreamer system administrator 2018-11-03 14:23:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/712.