vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Fri Jun 12 
21:35:19 2015 +0300| [6b8e952e44fe257ab973cc969329e3c3dcb4367b] | committer: 
Rémi Denis-Courmont

fourcc: make FourCC order total

The order of aliased entries was dependent on the build machine. This
is not a problem for good input, but affects duplicate detection.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6b8e952e44fe257ab973cc969329e3c3dcb4367b
---

 src/misc/fourcc_gen.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/misc/fourcc_gen.c b/src/misc/fourcc_gen.c
index 4f98a4d..aedd7d8 100644
--- a/src/misc/fourcc_gen.c
+++ b/src/misc/fourcc_gen.c
@@ -57,8 +57,10 @@ struct entry
 static int cmp_entry(const void *a, const void *b)
 {
     const struct entry *ea = a, *eb = b;
-
-    return memcmp(ea->alias, eb->alias, 4);
+    int d = memcmp(ea->alias, eb->alias, 4);
+    if (d == 0)
+        d = memcmp(ea->fourcc, eb->fourcc, 4);
+    return d;
 }
 
 static void process_list(const char *name, const staticentry_t *list, size_t n)

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to