avcodec/microdvddec: support various broken form of color tags
authorClément Bœsch <u@pkh.me>
Sun, 23 Nov 2014 11:16:30 +0000 (12:16 +0100)
committerClément Bœsch <u@pkh.me>
Sun, 23 Nov 2014 11:17:54 +0000 (12:17 +0100)
Inspired by a patch from Michal Wazgird <mplayer@cyryl.net>

See https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2014-November/072772.html

libavcodec/microdvddec.c

index b20aac5..b225ab9 100644 (file)
@@ -101,7 +101,7 @@ static char *microdvd_load_tags(struct microdvd_tag *tags, char *s)
         case 'C':
             tag.persistent = MICRODVD_PERSISTENT_ON;
         case 'c':
-            if (*s == '$')
+            while (*s == '$' || *s == '#')
                 s++;
             tag.data1 = strtol(s, &s, 16) & 0x00ffffff;
             if (*s != '}')