[Bug 779055] New: basetransform: improve handling of empty peercaps when intersecting
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Feb 22 07:41:27 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=779055
Bug ID: 779055
Summary: basetransform: improve handling of empty peercaps when
intersecting
Classification: Platform
Product: GStreamer
Version: git master
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gstreamer (core)
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: abhimanyu.v at imgtec.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
in gstbasetranform.c around line 674 check for empty peercaps is not present
should we also check it along with peercaps not NULL check?
Is this scenario possible or is it always expected that element should return
either NULL caps or valid?
Previous discussion histroy:
-----------------------------
[reply] [−] Comment 23 Sebastian Dröge (slomo) [GStreamer developer] 2017-02-09
11:53:49 UTC
If they're empty, they stay empty, no? Might just be a fast-path to error out
faster here. If you want to provide a patch, just do so :)
[reply] [−] Comment 24 abhimanyu.v at imgtec.com 2017-02-09 12:30:41 UTC
Created attachment 345310 [details] [review]
0001-dont-intersect-if-peercaps-is-empty_new
Check of empty peercaps as it should be similar to null peercaps.
[reply] [−] Comment 25 Sebastian Dröge (slomo) [GStreamer developer] 2017-02-10
11:11:28 UTC
Comment on attachment 345310 [details] [review]
0001-dont-intersect-if-peercaps-is-empty_new
This does not apply to latest GIT master, and would also cause the empty
peercaps to not be unreffed and leaked.
[reply] [−] Comment 26 abhimanyu.v at imgtec.com 2017-02-14 09:59:08 UTC
Created attachment 345712 [details] [review]
new patch for fixing empty peercaps usecase
New patch created from master
[reply] [−] Comment 27 abhimanyu.v at imgtec.com 2017-02-14 10:00:48 UTC
>and would also cause the empty peercaps to not be unreffed and leaked.
This seems not the case on master as at line 724, peercaps is being freed. All
path seems to go through it.
[reply] [−] Comment 28 Sebastian Dröge (slomo) [GStreamer developer] 2017-02-14
10:29:29 UTC
Review of attachment 345712 [details] [review]:
::: libs/gst/base/gstbasetransform.c
@@ +672,3 @@
gst_caps_unref (peerfilter);
+ if (peercaps && !gst_caps_is_empty (peercaps)) {
This is not equivalent though. If the caps are empty, now we would work with
the template caps. Before we would work with the empty caps and error out.
I think you want to add a "if (gst_caps_is_empty(peercaps)) goto done;" above
instead
[reply] [−] Comment 29 abhimanyu.v at imgtec.com 2017-02-14 13:03:43 UTC
>I think you want to add a "if (gst_caps_is_empty(peercaps)) goto done;" above instead
This will cause caps to return NULL which will still fail linking. we would
need to return some caps either it could be peerfilter as in case of peerfilter
empty or we return template as it is now. I think empty caps is kind of similar
to NULL caps practically?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list