mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
v4l2: sort formats in the right order so that non-emulated formats are prefered
The format list should be sorted from high ranks to low ranks. In the GSList sorting function this means the compare needs to return a positive value if format a has a lower rank than format b. Among other things this fixes v4l2src to prefer non-emulated formats to emulated formats when built against libv4l.
This commit is contained in:
parent
19c8226c6d
commit
dcea1b2dfc
1 changed files with 2 additions and 2 deletions
|
@ -864,8 +864,8 @@ format_cmp_func (gconstpointer a, gconstpointer b)
|
|||
if (fa->pixelformat == fb->pixelformat)
|
||||
return 0;
|
||||
|
||||
return gst_v4l2_object_format_get_rank (fa) -
|
||||
gst_v4l2_object_format_get_rank (fb);
|
||||
return gst_v4l2_object_format_get_rank (fb) -
|
||||
gst_v4l2_object_format_get_rank (fa);
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
|
|
Loading…
Reference in a new issue