}
#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
- if (subparse->state.current_language) {
- g_free (subparse->state.current_language);
- subparse->state.current_language = NULL;
- }
+ g_free (subparse->state.current_language);
+ subparse->state.current_language = NULL;
g_mutex_clear (&subparse->seek_lock);
#endif
}
#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
case PROP_EXTSUB_CURRENT_LANGUAGE:
- if (subparse->state.current_language)
- g_free(subparse->state.current_language);
-
+ g_free(subparse->state.current_language);
subparse->state.current_language = g_value_dup_string (value);
GST_LOG_OBJECT (subparse, "subtitle current language set to %s",
GST_STR_NULL (subparse->state.current_language));
encoding, err->message);
g_clear_error (&err);
- /* invalid input encoding, fall back to ISO-8859-15 (always succeeds) */
- ret = gst_convert_to_utf8 (str, len, "ISO-8859-15", consumed, NULL);
+#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+ if (!strcmp (self->encoding, "EUC-KR")) {
+ GST_WARNING ("fallback case occured with EUC-KR, so going with CP949");
+ g_free (self->encoding);
+ self->encoding = g_strdup ("CP949");
+ encoding = self->encoding;
+ ret = gst_convert_to_utf8 (str, len, encoding, consumed, &err);
+ } else {
+#endif
+ /* invalid input encoding, fall back to ISO-8859-15 (always succeeds) */
+ ret = gst_convert_to_utf8 (str, len, "ISO-8859-15", consumed, NULL);
+#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+ }
+#endif
}
GST_LOG_OBJECT (self,
#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
state->language_list = NULL;
+
+ g_free(state->current_language);
state->current_language = NULL;
+
state->langlist_msg_posted = FALSE;
#endif
}
g_free (unescaped);
#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
if (context->desired_language && context->current_language) {
- if (!strcmp(context->current_language, context->desired_language)) {
+ if ((!strcmp(context->current_language, context->desired_language)) || context->end_body) {
#endif
if (context->has_result) {
if (context->rubybuf->len) {
context->has_result = FALSE;
}
#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+ context->end_body = FALSE;
}
}
#endif