Skip to content

Commit

Permalink
update win-dshow
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Sep 18, 2019
1 parent 3916b13 commit 695e6d2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions win-dshow-replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ struct DShowReplayInput {
VideoConfig videoConfig;
AudioConfig audioConfig;

video_range_type range;
obs_source_frame2 frame;
obs_source_audio audio;

Expand Down Expand Up @@ -642,7 +643,7 @@ void DShowReplayInput::OnEncodedVideoData(enum AVCodecID id,

bool got_output;
bool success = ffmpeg_decode_video(video_decoder, data, size, &ts,
&frame, &got_output);
range, &frame, &got_output);
if (!success) {
blog(LOG_WARNING, "Error decoding video");
return;
Expand Down Expand Up @@ -1245,15 +1246,14 @@ inline bool DShowReplayInput::Activate(obs_data_t *settings)
if (!device.ConnectFilters())
return false;

enum video_colorspace cs = GetColorSpace(settings);

video_range_type range = GetColorRange(settings);
frame.range = GetColorRange(settings);

if (device.Start() != Result::Success)
return false;

bool success = video_format_get_parameters(cs, frame.range,
enum video_colorspace cs = GetColorSpace(settings);
range = GetColorRange(settings);
frame.range = range;

bool success = video_format_get_parameters(cs, range,
frame.color_matrix,
frame.color_range_min,
frame.color_range_max);
Expand Down

0 comments on commit 695e6d2

Please sign in to comment.