Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-03-24 01:32:35 +0300
committerClément Bœsch <u@pkh.me>2017-07-30 17:04:36 +0300
commitd2c70fc8879024565f4a6397d0230bffdc0afb15 (patch)
tree946ec222ffbbe16d64298e958e30e4a0e5b25727 /libswscale
parentca23d3491d4c3e316b968242dc14140603b27e70 (diff)
sws/tests/pixdesc_query: sort pixel formats
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/tests/pixdesc_query.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libswscale/tests/pixdesc_query.c b/libswscale/tests/pixdesc_query.c
index 34b33c6851..a0c843792a 100644
--- a/libswscale/tests/pixdesc_query.c
+++ b/libswscale/tests/pixdesc_query.c
@@ -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]);