diff isom.c @ 4586:674bf341b7e3 libavformat

return -1 for errors in ff_mov_iso639_to_lang() to allow for error checking
author aurel
date Thu, 26 Feb 2009 13:11:18 +0000
parents bbb6561a3974
children ffeb6885e714
line wrap: on
line diff
--- a/isom.c	Thu Feb 26 13:08:22 2009 +0000
+++ b/isom.c	Thu Feb 26 13:11:18 2009 +0000
@@ -257,7 +257,7 @@
     }
     /* XXX:can we do that in mov too? */
     if (!mp4)
-        return 0;
+        return -1;
     /* handle undefined as such */
     if (lang[0] == '\0')
         lang = "und";
@@ -265,9 +265,9 @@
     for (i = 0; i < 3; i++) {
         unsigned char c = (unsigned char)lang[i];
         if (c < 0x60)
-            return 0;
+            return -1;
         if (c > 0x60 + 0x1f)
-            return 0;
+            return -1;
         code <<= 5;
         code |= (c - 0x60);
     }