diff options
author | LRN <lrn1986@gmail.com> | 2012-09-03 14:25:09 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2012-09-03 14:25:09 +0000 |
commit | 59c6a50d7a8d8c368a3932224dd136dbe37e99f2 (patch) | |
tree | 3617f3137463d4f0e2c2824fdb4abe82eb9f8852 | |
parent | 948506289c6fc3fc78bffe0b705e32ab879d61f7 (diff) | |
download | libextractor-59c6a50d7a8d8c368a3932224dd136dbe37e99f2.tar.gz libextractor-59c6a50d7a8d8c368a3932224dd136dbe37e99f2.zip |
Fix TOC sending
-rw-r--r-- | src/plugins/gstreamer_extractor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/gstreamer_extractor.c b/src/plugins/gstreamer_extractor.c index 918a3cc..a293949 100644 --- a/src/plugins/gstreamer_extractor.c +++ b/src/plugins/gstreamer_extractor.c | |||
@@ -1606,8 +1606,7 @@ send_info (GstDiscovererInfo * info, struct PrivStruct *ps) | |||
1606 | ps->toc_length = 0; | 1606 | ps->toc_length = 0; |
1607 | g_list_foreach (entries, send_toc_foreach, ps); | 1607 | g_list_foreach (entries, send_toc_foreach, ps); |
1608 | 1608 | ||
1609 | /* FIXME: correct limit */ | 1609 | if (ps->toc_length > 0) |
1610 | if (ps->toc_length > 0 && ps->toc_length < 32*1024 - 1 - strlen (TOC_XML_HEADER)) | ||
1611 | { | 1610 | { |
1612 | ps->toc_print_phase = TRUE; | 1611 | ps->toc_print_phase = TRUE; |
1613 | ps->toc_length += 1 + strlen (TOC_XML_HEADER); | 1612 | ps->toc_length += 1 + strlen (TOC_XML_HEADER); |
@@ -1619,7 +1618,8 @@ send_info (GstDiscovererInfo * info, struct PrivStruct *ps) | |||
1619 | ps->time_to_leave = ps->ec->proc (ps->ec->cls, "gstreamer", | 1618 | ps->time_to_leave = ps->ec->proc (ps->ec->cls, "gstreamer", |
1620 | EXTRACTOR_METATYPE_TOC, EXTRACTOR_METAFORMAT_C_STRING, "application/xml", | 1619 | EXTRACTOR_METATYPE_TOC, EXTRACTOR_METAFORMAT_C_STRING, "application/xml", |
1621 | (const char *) ps->toc, ps->toc_length); | 1620 | (const char *) ps->toc, ps->toc_length); |
1622 | 1621 | g_free (ps->toc); | |
1622 | ps->toc = NULL; | ||
1623 | } | 1623 | } |
1624 | } | 1624 | } |
1625 | 1625 | ||