[FFmpeg-devel] [PATCH] mov: add support for little-endian utf16 chapter names

Janne Grunau janne-ffmpeg
Thu Jan 27 18:07:13 CET 2011


From: John Stebbins <stebbins at jetheaddev.com>

refreshed patch against master

Janne

-- 8< --
fixes a regressin in 225b6d7
"mov: simplify mov_read_chapters() by using avio_get_str16be"

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index ea9423b..7ad920f 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);
-- 
1.7.4.rc2




More information about the ffmpeg-devel mailing list