subparse: consider the seeking during parsing buffer
authorEunhae Choi <eunhae1.choi@samsung.com>
Mon, 26 Nov 2018 11:42:03 +0000 (20:42 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Tue, 27 Nov 2018 03:02:00 +0000 (12:02 +0900)
- after seeking, whole subtitle text will be delivered
  from the start position again
  followed by previous buffer data.

Change-Id: I8a84352ea5226d044fed53e2107a5280921326a6

gst/subparse/samiparse.c

index 8d614c9..0ed207e 100644 (file)
@@ -698,6 +698,13 @@ html_context_parse (HtmlContext * ctxt, gchar * text, gsize text_len)
         return;
       }
 
+#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+      /* after seeking,
+         the subtitle file will be delivered from the start again. */
+      if (strcasestr(next, "<SAMI>"))
+        next = strcasestr(next, "<SAMI>");
+#endif
+
       next = string_token (next, ">", &element);
       next++;
       if (g_str_has_suffix (next, "/")) {