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)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 28 Jan 2011 02:15:35 +0000 (03:15 +0100)
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 97b04f5ed3ab3a62e57f0c16841fb8f10d0a174c)

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);