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 773323 - vaapidecode: fix buffer size
vaapidecode: fix buffer size
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other All
: Normal normal
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-21 15:12 UTC by Víctor Manuel Jáquez Leal
Modified: 2016-11-04 13:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapidecode: fix buffer size (1.74 KB, patch)
2016-10-21 15:12 UTC, Víctor Manuel Jáquez Leal
none Details | Review
plugins: set negotiation caps in src allocator (2.49 KB, patch)
2016-11-04 12:41 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Víctor Manuel Jáquez Leal 2016-10-21 15:12:28 UTC
When disabling vaapipostproc, if the allocation caps are different from the
negotiation caps, the software sinks (e.g. xvimagesink) cannot map the frame
because the GstVideoMeta reports the allocation caps size, not the 
negotiated caps.

The attached patch worksarounds the issue by rewritting the values of the
video meta, though the real solution would be using the the negotiation
caps when setting the GstVideoMeta in the vaapibufferpool
Comment 1 Víctor Manuel Jáquez Leal 2016-10-21 15:12:32 UTC
Created attachment 338195 [details] [review]
vaapidecode: fix buffer size

Fix buffer resolution if the allocation caps are different from the
negotiation caps.
Comment 2 Víctor Manuel Jáquez Leal 2016-11-04 12:41:36 UTC
Created attachment 339118 [details] [review]
plugins: set negotiation caps in src allocator

When the allocator is created, it stores the allocation caps. But sometimes
the "allocation caps" may be different from the "negotiation caps".

In this case, the allocator should store the negotiation caps since they
are the ones used for frame mapping with GstVideoMeta.

When vaapispostproc is used, this is not a problem since the element is assume
to resize. But when using a vaapi decoder only, with a software renderer, it
fails in this case.
Comment 3 Víctor Manuel Jáquez Leal 2016-11-04 13:00:38 UTC
Attachment 339118 [details] pushed as 1f190e4 - plugins: set negotiation caps in src allocator
Comment 4 Víctor Manuel Jáquez Leal 2016-11-04 13:08:15 UTC
this patch should be back ported to 1.10, and perhaps 1.8 too
Comment 5 Tim-Philipp Müller 2016-11-04 13:37:28 UTC
1.8.4 is scheduled for the near future fwiw.