Skip to content

Commit

Permalink
fix regression in e720329 if not color_range=pc
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Nov 27, 2023
1 parent e720329 commit 5861fee
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/modules/qt/producer_qimage.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* producer_image.c -- a Qt/QImage based producer for MLT
* Copyright (C) 2006-2022 Meltytech, LLC
* Copyright (C) 2006-2023 Meltytech, LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -228,6 +228,12 @@ static int producer_get_image(mlt_frame frame,
self->current_image = mlt_cache_item_data(self->image_cache, NULL);
self->alpha_cache = mlt_service_cache_get(MLT_PRODUCER_SERVICE(producer), "qimage.alpha");
self->current_alpha = mlt_cache_item_data(self->alpha_cache, &self->alpha_size);

const char *dst_color_range = mlt_properties_get(properties, "consumer.color_range");
int dst_full_range = dst_color_range
&& (!strcmp("pc", dst_color_range) || !strcmp("jpeg", dst_color_range));
if (dst_full_range)
mlt_properties_set_int(properties, "full_range", 1);
}
refresh_image(self, frame, *format, *width, *height, enable_caching);

Expand Down Expand Up @@ -331,7 +337,6 @@ static int producer_get_frame(mlt_producer producer, mlt_frame_ptr frame, int in
}

// Set producer-specific frame properties
mlt_properties_set_int(properties, "full_range", 1);
mlt_properties_set_int(properties, "progressive", 1);
mlt_properties_set_int(properties,
"format",
Expand Down

0 comments on commit 5861fee

Please sign in to comment.