mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
subparse: don't reset allowed tags
When a discont buffer is processed, the state is re-initialized, which nullifies the allowed_tags. The problem is when a subrip string with tags is processed and allowed_tags is NULL. The function subrip_unescape_formatting() calls g_strjoinv with a str_array as NULL, leading to a GLib-CRITICAL. This patch removes the allowed_tags resetting, in parser_state_init(), but move it into gst_sub_parse_format_autodetect(). https://bugzilla.gnome.org/show_bug.cgi?id=768525
This commit is contained in:
parent
7960bc0380
commit
c646c62a02
1 changed files with 1 additions and 1 deletions
|
@ -1353,7 +1353,6 @@ parser_state_init (ParserState * state)
|
|||
state->max_duration = 0; /* no limit */
|
||||
state->state = 0;
|
||||
state->segment = NULL;
|
||||
state->allowed_tags = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1575,6 +1574,7 @@ gst_sub_parse_format_autodetect (GstSubParse * self)
|
|||
self->parser_type = format;
|
||||
self->subtitle_codec = gst_sub_parse_get_format_description (format);
|
||||
parser_state_init (&self->state);
|
||||
self->state.allowed_tags = NULL;
|
||||
|
||||
switch (format) {
|
||||
case GST_SUB_PARSE_FORMAT_MDVDSUB:
|
||||
|
|
Loading…
Reference in a new issue