Skip to content

Commit

Permalink
fix audio source check
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed May 15, 2019
1 parent 33bc167 commit 296a17b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions replay-source.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,21 +1218,20 @@ static void replay_retrieve(struct replay_source *c)
obs_source_t *as = obs_get_source_by_name(c->source_audio_name);
c->source_audio_filter = NULL;
if(as){
if(strcmp(obs_source_get_id(s),"dshow_input_replay")== 0)
if(strcmp(obs_source_get_id(as),"dshow_input_replay")== 0)
{
dswow_audio = true;
}else{
obs_source_enum_filters(s, EnumFilter, c);
obs_source_enum_filters(as, EnumAudioVideoFilter, c);
}
obs_source_enum_filters(as, EnumAudioVideoFilter, c);
}

struct replay_filter* vf = c->source_filter?obs_obj_get_data(c->source_filter):NULL;
if(dswow_video)
vf = obs_obj_get_data(s);
struct replay_filter* af = c->source_audio_filter?obs_obj_get_data(c->source_audio_filter):vf;
if(dswow_audio)
af = obs_obj_get_data(s);
af = obs_obj_get_data(as);
if(vf && vf->video_frames.size == 0)
vf = NULL;
if(af && af->audio_frames.size == 0)
Expand Down

0 comments on commit 296a17b

Please sign in to comment.