+2008-12-11 Edward Hervey <edward.hervey@collabora.co.uk>
+
+ * gst/subparse/samiparse.c: (sami_context_push_state),
+ (sami_context_pop_state), (start_sami_element), (end_sami_element):
+ Some versions of libxml seem to be very picky as to strict formatting
+ of the input and never 'close' the final </body> tag.
+ In order to fix that bad behaviour, we trigger the flushing of
+ remaining data on both </body> and </sami>.
+ Fixes #557365
+
2008-12-11 Sebastian Dröge <sebastian.droege@collabora.co.uk>
Patch by: Guillaume Emont <guillaume at fluendo dot com>
static void
sami_context_push_state (GstSamiContext * sctx, char state)
{
+ GST_LOG ("state %c", state);
g_string_append_c (sctx->state, state);
}
GString *context_state = sctx->state;
int i;
+ GST_LOG ("state %c", state);
for (i = context_state->len - 1; i >= 0; i--) {
switch (context_state->str[i]) {
case ITALIC_TAG: /* <i> */
{
GstSamiContext *sctx = (GstSamiContext *) ctx;
+ GST_LOG ("name:%s", name);
+
if (!xmlStrncmp ((const xmlChar *) "sync", name, 4)) {
handle_start_sync (sctx, atts);
sctx->in_sync = TRUE;
{
GstSamiContext *sctx = (GstSamiContext *) ctx;
+ GST_LOG ("name:%s", name);
+
if (!xmlStrncmp ((const xmlChar *) "sync", name, 4)) {
sctx->in_sync = FALSE;
- } else if (!xmlStrncmp ((const xmlChar *) "body", name, 4)) {
+ } else if ((!xmlStrncmp ((const xmlChar *) "body", name, 4)) ||
+ (!xmlStrncmp ((const xmlChar *) "sami", name, 4))) {
/* We will usually have one buffer left when the body is closed
* as we need the next sync to actually send it */
if (sctx->buf->len != 0) {