2006-10-18 Tim-Philipp Müller <tim at centricular dot net>
+ * gst/subparse/gstsubparse.c: (gst_sub_parse_dispose),
+ (gst_sub_parse_change_state):
+ Fix memleak; clear subparse->textbuf n state change function.
+
+2006-10-18 Tim-Philipp Müller <tim at centricular dot net>
+
* gst/subparse/gstsubparse.c:
(gst_sub_parse_data_format_autodetect):
Don't require subrip (.srt) files to start with a chunk number of 1.
g_free (subparse->encoding);
subparse->encoding = NULL;
}
+ if (subparse->textbuf) {
+ g_string_free (subparse->textbuf, TRUE);
+ subparse->textbuf = NULL;
+ }
sami_context_deinit (&subparse->state);
GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
switch (transition) {
case GST_STATE_CHANGE_READY_TO_PAUSED:
/* format detection will init the parser state */
- self->offset = self->next_offset = 0;
+ self->offset = 0;
+ self->next_offset = 0;
self->parser_type = GST_SUB_PARSE_FORMAT_UNKNOWN;
self->valid_utf8 = TRUE;
+ g_string_truncate (self->textbuf, 0);
break;
default:
break;