summaryrefslogtreecommitdiff
path: root/libavformat/isom.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2009-02-26 13:11:18 +0000
committerAurelien Jacobs <aurel@gnuage.org>2009-02-26 13:11:18 +0000
commit2904fd398f26f0a2db99dcec54cd009826344c61 (patch)
tree1f3fee087c83840f59ee069632d6df707aa2d1c5 /libavformat/isom.c
parentb97fb809b8f0b2bd4ba5ab93e3f9e2540092ff79 (diff)
return -1 for errors in ff_mov_iso639_to_lang() to allow for error checking
Originally committed as revision 17611 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/isom.c')
-rw-r--r--libavformat/isom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/isom.c b/libavformat/isom.c
index 39c58c64df..b78d65e8fb 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -257,7 +257,7 @@ int ff_mov_iso639_to_lang(const char *lang, int mp4)
}
/* 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 @@ int ff_mov_iso639_to_lang(const char *lang, int mp4)
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);
}