diff --git a/lib/libopc/libmce.a b/lib/libopc/libmce.a index febcf9c..69b071a 100644 Binary files a/lib/libopc/libmce.a and b/lib/libopc/libmce.a differ diff --git a/lib/libopc/libopc.a b/lib/libopc/libopc.a index 64425a5..594608c 100644 Binary files a/lib/libopc/libopc.a and b/lib/libopc/libopc.a differ diff --git a/lib/libopc/libplib.a b/lib/libopc/libplib.a index 78529ba..fa1cb3f 100644 Binary files a/lib/libopc/libplib.a and b/lib/libopc/libplib.a differ diff --git a/src/parsing/doc.c b/src/parsing/doc.c index 1106e3a..75c91d2 100644 --- a/src/parsing/doc.c +++ b/src/parsing/doc.c @@ -66,7 +66,7 @@ void read_part(opcContainer *c, dyn_buffer_t *buf, opcPart part, document_t *doc mce_start_element(&reader, NULL, NULL) { dump_text(&reader, buf); } mce_end_element(&reader); - }mce_end_document(&reader); + } mce_end_document(&reader); mceTextReaderCleanup(&reader); } diff --git a/src/parsing/media.c b/src/parsing/media.c index 9d77bbc..04637a6 100644 --- a/src/parsing/media.c +++ b/src/parsing/media.c @@ -322,6 +322,8 @@ void parse_media_filename(const char *filepath, document_t *doc) { int res = avformat_open_input(&pFormatCtx, filepath, NULL, NULL); if (res < 0) { LOG_ERRORF(doc->filepath, "(media.c) avformat_open_input() returned [%d] %s", res, av_err2str(res)) + avformat_close_input(&pFormatCtx); + avformat_free_context(pFormatCtx); return; } @@ -357,13 +359,22 @@ void parse_media_vfile(struct vfile *f, document_t *doc) { int res = avformat_open_input(&pFormatCtx, "", NULL, NULL); if (res == -5) { // Tried to parse media that requires seek + av_free(io_ctx->buffer); + avio_context_free(&io_ctx); + avformat_close_input(&pFormatCtx); + avformat_free_context(pFormatCtx); return; } else if (res < 0) { LOG_ERRORF(doc->filepath, "(media.c) avformat_open_input() returned [%d] %s", res, av_err2str(res)) + av_free(io_ctx->buffer); + avio_context_free(&io_ctx); + avformat_close_input(&pFormatCtx); + avformat_free_context(pFormatCtx); return; } parse_media(pFormatCtx, doc); - av_free(io_ctx); + av_free(io_ctx->buffer); + avio_context_free(&io_ctx); } diff --git a/src/parsing/mime_generated.c b/src/parsing/mime_generated.c index c1794c3..3f1d256 100644 --- a/src/parsing/mime_generated.c +++ b/src/parsing/mime_generated.c @@ -1193,6 +1193,8 @@ g_hash_table_insert(ext_table, "srt", (gpointer)text_plain); g_hash_table_insert(ext_table, "nfo", (gpointer)text_plain); g_hash_table_insert(ext_table, "sfv", (gpointer)text_plain); g_hash_table_insert(ext_table, "m3u", (gpointer)text_plain); +g_hash_table_insert(ext_table, "csv", (gpointer)text_plain); +g_hash_table_insert(ext_table, "eml", (gpointer)text_plain); g_hash_table_insert(ext_table, "rt", (gpointer)text_richtext); g_hash_table_insert(ext_table, "rtf", (gpointer)text_richtext); g_hash_table_insert(ext_table, "rtx", (gpointer)text_richtext);