aboutsummaryrefslogtreecommitdiff
path: root/src/AsyncImageLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/AsyncImageLoader.cpp')
-rw-r--r--src/AsyncImageLoader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/AsyncImageLoader.cpp b/src/AsyncImageLoader.cpp
index ddcb604..d7fbfbe 100644
--- a/src/AsyncImageLoader.cpp
+++ b/src/AsyncImageLoader.cpp
@@ -161,7 +161,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(), false)) {
+ if(!file_analyzer.load_file(thumbnail_path.data.c_str(), true)) {
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;
@@ -169,10 +169,10 @@ namespace QuickMedia {
}
if(is_content_type_video(file_analyzer.get_content_type())) {
- if(video_get_first_frame(thumbnail_path.data.c_str(), thumbnail_path_resized.data.c_str(), resize_target_size.x, resize_target_size.y)) {
+ if(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 first frame of %s\n", thumbnail_path.data.c_str());
+ fprintf(stderr, "Failed to get video frame of %s\n", thumbnail_path.data.c_str());
thumbnail_data->image = std::make_unique<mgl::Image>();
thumbnail_data->loading_state = LoadingState::FINISHED_LOADING;
}