From 97b04f5ed3ab3a62e57f0c16841fb8f10d0a174c Mon Sep 17 00:00:00 2001
From: John Stebbins <stebbins@jetheaddev.com>
Date: Wed, 26 Jan 2011 05:15:49 +0000
Subject: [PATCH] mov: add support for little-endian utf16 chapter names

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
---
 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index ea9423ba7b2..7ad920fcb1a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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);
-- 
GitLab