mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
sws/tests/pixdesc_query: sort pixel formats
This commit is contained in:
parent
ca23d3491d
commit
d2c70fc887
@ -18,6 +18,8 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "libavutil/mem.h"
|
||||
#include "libswscale/swscale_internal.h"
|
||||
|
||||
@ -44,6 +46,13 @@ static const struct {
|
||||
{"usePal", usePal},
|
||||
};
|
||||
|
||||
static int cmp_str(const void *a, const void *b)
|
||||
{
|
||||
const char *s1 = *(const char **)a;
|
||||
const char *s2 = *(const char **)b;
|
||||
return strcmp(s1, s2);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i, j;
|
||||
@ -60,6 +69,8 @@ int main(void)
|
||||
}
|
||||
|
||||
if (pix_fmts) {
|
||||
qsort(pix_fmts, nb_pix_fmts, sizeof(*pix_fmts), cmp_str);
|
||||
|
||||
printf("%s:\n", query_tab[i].class);
|
||||
for (j = 0; j < nb_pix_fmts; j++)
|
||||
printf(" %s\n", pix_fmts[j]);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user