diff options
Diffstat (limited to 'src/AsyncImageLoader.cpp')
-rw-r--r-- | src/AsyncImageLoader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AsyncImageLoader.cpp b/src/AsyncImageLoader.cpp index b0efb05..2919f41 100644 --- a/src/AsyncImageLoader.cpp +++ b/src/AsyncImageLoader.cpp @@ -160,7 +160,7 @@ namespace QuickMedia { void AsyncImageLoader::load_create_thumbnail(const Path &thumbnail_path, const Path &thumbnail_path_resized, ThumbnailData *thumbnail_data, mgl::vec2i resize_target_size) { FileAnalyzer file_analyzer; - if(!file_analyzer.load_file(thumbnail_path.data.c_str(), true)) { + if(!file_analyzer.load_file(thumbnail_path.data.c_str(), false)) { fprintf(stderr, "Failed to convert %s to a thumbnail\n", thumbnail_path.data.c_str()); thumbnail_data->image = std::make_unique<mgl::Image>(); thumbnail_data->loading_state = LoadingState::FINISHED_LOADING; @@ -168,7 +168,7 @@ namespace QuickMedia { } if(is_content_type_video(file_analyzer.get_content_type())) { - if(video_get_first_frame(file_analyzer, thumbnail_path_resized.data.c_str(), resize_target_size.x, resize_target_size.y)) { + if(file_analyzer.load_metadata() && video_get_first_frame(file_analyzer, thumbnail_path_resized.data.c_str(), resize_target_size.x, resize_target_size.y)) { thumbnail_data->loading_state = LoadingState::READY_TO_LOAD; } else { fprintf(stderr, "Failed to get video frame of %s\n", thumbnail_path.data.c_str()); |