Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed May 15, 2024
1 parent 296da35 commit 857e358
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/modules/avformat/producer_avformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2663,12 +2663,15 @@ static int video_codec_init(producer_avformat self, int index, mlt_properties pr
if (thread_count >= 0)
codec_context->thread_count = thread_count;

// fix lowres if set too high
int lowres = mlt_properties_get_int(properties, "lowres");
if (lowres > codec_context->codec->max_lowres) {
mlt_log_debug( MLT_PRODUCER_SERVICE( self->parent ), "clamping lowres=%i to max_lowres=%i\n", lowres, codec_context->codec->max_lowres );
mlt_properties_set_int(properties, "lowres", codec_context->codec->max_lowres);
}
// fix lowres if set too high
int lowres = mlt_properties_get_int(properties, "lowres");
if (lowres > codec_context->codec->max_lowres) {
mlt_log_debug(MLT_PRODUCER_SERVICE(self->parent),
"clamping lowres=%i to max_lowres=%i\n",
lowres,
codec_context->codec->max_lowres);
mlt_properties_set_int(properties, "lowres", codec_context->codec->max_lowres);
}

#if USE_HWACCEL
if (self->hwaccel.device_type == AV_HWDEVICE_TYPE_NONE
Expand Down

0 comments on commit 857e358

Please sign in to comment.