Skip to content

Commit

Permalink
check on unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Bramart committed Feb 9, 2024
1 parent 4b4a13a commit bb4c332
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/filter_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,19 @@ impl FilterGraph {
unsafe {
for frame in in_audio_frames {
for input in &self.audio_inputs {
if input.get_label() == frame.name.clone().unwrap() {
check_result!(av_buffersrc_add_frame(input.context, frame.frame));
if let Some(label) = &frame.name {
if input.get_label() == *label {
check_result!(av_buffersrc_add_frame(input.context, frame.frame));
}
}
}
}
for frame in in_video_frames {
for input in &self.video_inputs {
if input.get_label() == frame.name.clone().unwrap() {
check_result!(av_buffersrc_add_frame(input.context, frame.frame));
if let Some(label) = &frame.name {
if input.get_label() == *label {
check_result!(av_buffersrc_add_frame(input.context, frame.frame));
}
}
}
}
Expand Down

0 comments on commit bb4c332

Please sign in to comment.