GNOME Bugzilla – Bug 522625
[video] gst_video_format_parse_caps() broken for RGBA formats
Last modified: 2008-03-17 10:32:33 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.
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.
2008-03-17 Tim-Philipp Müller <tim at centricular dot net> * gst-libs/gst/video/video.c: (gst_video_format_parse_caps), (gst_video_format_from_rgba32_masks): Fix gst_video_format_parse_caps() for RGB caps with alpha channel (#522635). * 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.