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.
This commit is contained in:
Luke Yelavich 2018-03-07 10:06:49 +11:00
parent 7337b7ffb8
commit 24d2346a1c

View File

@ -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);