Browse Source

mac-vth264: Set the fullrange variable before calling vt_h264_video_info

The fullrange variable is used to set appropriate video format information in
vt_h264_video_info. Set fullrange first so the video format data is correct in
all cases.
Luke Yelavich 7 years ago
parent
commit
24d2346a1c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      plugins/mac-vth264/encoder.c

+ 2 - 1
plugins/mac-vth264/encoder.c

@@ -445,11 +445,12 @@ static void update_params(struct vt_h264_encoder *enc, obs_data_t *settings)
 
 	struct video_scale_info info = { .format = voi->format };
 
+	enc->fullrange = voi->range == VIDEO_RANGE_FULL;
+
 	// also sets the enc->vt_pix_fmt
 	vt_h264_video_info(enc, &info);
 
 	enc->colorspace = voi->colorspace;
-	enc->fullrange = voi->range == VIDEO_RANGE_FULL;
 
 	enc->width = obs_encoder_get_width(enc->encoder);
 	enc->height = obs_encoder_get_height(enc->encoder);