summaryrefslogtreecommitdiff
path: root/libavformat/isom.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2012-03-21 14:18:16 -0700
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-03-09 18:09:39 +0100
commit9e71cc81f3655cacf0f91860fba3043f13b64059 (patch)
treef8e6be8766ba7018814c0a3d0bf0027c3791d60b /libavformat/isom.c
parent8a0bc40545a216a49f43db5d9a42a63961333354 (diff)
movdec: handle 0x7fff langcode as macintosh per the specs
The correct point that seperates ISO and MAC language codes is 0x400 according to the current QT spec. Old QT specs did not list where this seperation is but apparently only defined the meaning of the first 137.
Diffstat (limited to 'libavformat/isom.c')
-rw-r--r--libavformat/isom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/isom.c b/libavformat/isom.c
index b0923c40cf..1748d7cb60 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -355,7 +355,7 @@ int ff_mov_lang_to_iso639(unsigned code, char to[4])
memset(to, 0, 4);
/* is it the mangled iso code? */
/* see http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt */
- if (code > 138) {
+ if (code >= 0x400 && code != 0x7fff) {
for (i = 2; i >= 0; i--) {
to[i] = 0x60 + (code & 0x1f);
code >>= 5;