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 792399 - inputselector: always proxy context query
inputselector: always proxy context query
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-10 10:23 UTC by Michael Tretter
Modified: 2018-11-03 12:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-inputselector-always-proxy-context-query.patch (1.17 KB, patch)
2018-01-10 10:23 UTC, Michael Tretter
none Details | Review

Description Michael Tretter 2018-01-10 10:23:58 UTC
Created attachment 366596 [details] [review]
0001-inputselector-always-proxy-context-query.patch

The input selector should forward the GST_QUERY_CONTEXT for inactive pads,
because a context should be shared between multiple elements in a pipeline and 
elements that are linked via an input selector should share the same context.

In my concrete use case, I have a pipeline that has a vaapidecodebin and 
vaapisink with an input selector in between. The sink pad of the input
selector that is linked to the vaapidecodebin is not the active pad, but is switched once the STREAM_START event arrives on that pad.

As soon as the first buffer arrives from the vaapipostproc at the vaapisink
and is looked up via the surface id, the vaapisink crashes, because it fails
to find the surface in its va context.

The problem is that the vaapipostproc element tries to get a va display from
the sink with a GST_QUERY_CONTEXT query, but the query is not correctly
forwarded by the input selector, because the sink pad is not the active pad.
Consequently, the vaapipostproc element creates a new display (and underlying
va context), which is distinct from the one the vaapisink is using. Therefore,
the elements are looking for the surface ids in different contexts.

I can work around this issue by using a funnel instead of the input selector
or by handling the HAVE_CONTEXT and NEED_CONTEXT messages in my application,
but I would expect that this is handled in the pipeline, because the elements
are already linked.
Comment 1 GStreamer system administrator 2018-11-03 12:44:19 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/gstreamer/issues/268.