Skip to content

Commit

Permalink
Skip avformat_find_stream_info when registering input stream(#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
wkozyra95 authored Dec 4, 2023
1 parent 0af56cc commit d6143f9
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/rtp_receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ use std::{
};

use ffmpeg_next::{
ffi::{
avformat_alloc_context, avformat_close_input, avformat_find_stream_info,
avformat_open_input,
},
ffi::{avformat_alloc_context, avformat_open_input},
format::context,
media::Type,
util::interrupt,
Expand Down Expand Up @@ -211,14 +208,7 @@ where
Dictionary::own(opts);

match res {
0 => match avformat_find_stream_info(ps, ptr::null_mut()) {
r if r >= 0 => Ok(context::Input::wrap(ps)),
e => {
avformat_close_input(&mut ps);
Err(ffmpeg_next::Error::from(e))
}
},

0 => Ok(context::Input::wrap(ps)),
e => Err(ffmpeg_next::Error::from(e)),
}
}
Expand Down

0 comments on commit d6143f9

Please sign in to comment.