Skip to content

Commit

Permalink
On Chain init, don't unnecessarily fetch source frame (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-b-m authored Sep 4, 2023
1 parent 714a7da commit 1d3669e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/framework/mlt_chain.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ void mlt_chain_set_source(mlt_chain self, mlt_producer source)
// Save the native source producer frame rate
base->source_profile = mlt_profile_clone(mlt_service_profile(MLT_CHAIN_SERVICE(self)));
mlt_frame frame = NULL;
mlt_service_get_frame(MLT_PRODUCER_SERVICE(source), &frame, 0);
mlt_frame_close(frame);
if (!mlt_properties_exists(source_properties, "meta.media.frame_rate_num") || !mlt_properties_exists(source_properties, "meta.media.frame_rate_den")) {
mlt_service_get_frame(MLT_PRODUCER_SERVICE(source), &frame, 0);
mlt_frame_close(frame);
}
if (mlt_properties_get_int(source_properties, "meta.media.frame_rate_num") > 0
&& mlt_properties_get_int(source_properties, "meta.media.frame_rate_den") > 0) {
base->source_profile->frame_rate_num
Expand Down

0 comments on commit 1d3669e

Please sign in to comment.