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 522625 - [video] gst_video_format_parse_caps() broken for RGBA formats
[video] gst_video_format_parse_caps() broken for RGBA formats
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2008-03-15 16:10 UTC by Tim-Philipp Müller
Modified: 2008-03-17 10:32 UTC
See Also:
GNOME target: ---
GNOME version: ---

Fix plus unit test (3.72 KB, patch)
2008-03-15 16:15 UTC, Tim-Philipp Müller
committed Details | Review

Description Tim-Philipp Müller 2008-03-15 16:10:03 UTC
gst_video_format_parse_caps() doesn't work for 32-bit RGB formats with alpha channel, due to three trivial typos in the code.

This is not a regression, but a pretty grave bug, and the required fixes are trivial and obviously correct, hence marking as blocker.

Patch will also contain a comprehensive unit test that checks for internal consistency of the new API and for consistency of the new API with the old GST_VIDEO_CAPS_* defines.
Comment 1 Tim-Philipp Müller 2008-03-15 16:15:25 UTC
Created attachment 107343 [details] [review]
Fix plus unit test

Note how the current versions of the checks to be modified in gst_video_format_from_rgba32_masks are obviously wrong since they want the same value for green_mask and blue_mask in the first check and blue_mask and alpha_mask in the second check.
Comment 2 Tim-Philipp Müller 2008-03-17 10:32:33 UTC
 2008-03-17  Tim-Philipp Müller  <tim at centricular dot net>

	* gst-libs/gst/video/video.c: (gst_video_format_parse_caps),
	  Fix gst_video_format_parse_caps() for RGB caps with alpha channel

	* tests/check/libs/video.c: (test_parse_caps_rgb), (video_suite):
	  Add unit test for the RGB caps parsing and creation, checking for
	  internal consistency of the new API and consistency of the API with
	  the old GST_VIDEO_CAPS_* defines.