Compare commits

...

3 Commits

2 changed files with 9 additions and 9 deletions

View File

@ -11,11 +11,6 @@ if (SIST_DEBUG)
antiword antiword
DEBUG DEBUG
) )
else()
add_compile_definitions(
antiword
NDEBUG
)
target_compile_options( target_compile_options(
antiword antiword
PRIVATE PRIVATE
@ -25,6 +20,11 @@ else()
-fsanitize=address -fsanitize=address
-fno-inline -fno-inline
) )
else()
add_compile_definitions(
antiword
NDEBUG
)
endif() endif()
add_library( add_library(

View File

@ -251,7 +251,7 @@ void append_tag_meta_if_not_exists(scan_media_ctx_t *ctx, document_t *doc, AVDic
for (; *ptr; ++ptr) *ptr = (char) tolower(*ptr); for (; *ptr; ++ptr) *ptr = (char) tolower(*ptr);
__always_inline __always_inline
static void append_audio_meta(AVFormatContext *pFormatCtx, document_t *doc) { static void append_audio_meta(scan_media_ctx_t *ctx, AVFormatContext *pFormatCtx, document_t *doc) {
AVDictionaryEntry *tag = NULL; AVDictionaryEntry *tag = NULL;
while ((tag = av_dict_get(pFormatCtx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) { while ((tag = av_dict_get(pFormatCtx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {
@ -269,7 +269,7 @@ static void append_audio_meta(AVFormatContext *pFormatCtx, document_t *doc) {
} else if (strcmp(key, "album") == 0) { } else if (strcmp(key, "album") == 0) {
APPEND_TAG_META(MetaAlbum) APPEND_TAG_META(MetaAlbum)
} else if (strcmp(key, "comment") == 0) { } else if (strcmp(key, "comment") == 0) {
APPEND_TAG_META(MetaContent) append_tag_meta_if_not_exists(ctx, doc, tag, MetaContent);
} }
} }
} }
@ -437,7 +437,7 @@ int decode_frame_and_save_thumbnail(scan_media_ctx_t *ctx, AVFormatContext *pFor
return SAVE_THUMBNAIL_FAILED; return SAVE_THUMBNAIL_FAILED;
} }
if (ctx->tesseract_lang != NULL && IS_VIDEO(pFormatCtx)) { if (ctx->tesseract_lang != NULL && IS_VIDEO(pFormatCtx) && thumbnail_index == 0) {
ocr_image(ctx, doc, decoder, frame_and_packet->frame); ocr_image(ctx, doc, decoder, frame_and_packet->frame);
} }
@ -558,7 +558,7 @@ void parse_media_format_ctx(scan_media_ctx_t *ctx, AVFormatContext *pFormatCtx,
} }
if (audio_stream != -1) { if (audio_stream != -1) {
append_audio_meta(pFormatCtx, doc); append_audio_meta(ctx, pFormatCtx, doc);
} }
if (video_stream != -1 && ctx->tn_count > 0) { if (video_stream != -1 && ctx->tn_count > 0) {