mov: add support for little-endian utf16 chapter names
authorJohn Stebbins <stebbins@jetheaddev.com>
Wed, 26 Jan 2011 05:15:49 +0000 (05:15 +0000)
committerJanne Grunau <janne-ffmpeg@jannau.net>
Fri, 28 Jan 2011 00:06:57 +0000 (01:06 +0100)
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
libavformat/mov.c

index ea9423b..7ad920f 100644 (file)
@@ -2326,6 +2326,8 @@ static void mov_read_chapters(AVFormatContext *s)
         ch = get_be16(sc->pb);
         if (ch == 0xfeff)
             avio_get_str16be(sc->pb, len, title, title_len);
+        else if (ch == 0xfffe)
+            avio_get_str16le(sc->pb, len, title, title_len);
         else {
             AV_WB16(title, ch);
             get_strz(sc->pb, title + 2, len - 1);