Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the order of the parameters to make the test pass #119

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions FilterPlugin/src/main/java/io/antmedia/filter/FilterAdaptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,17 @@ public Result update()

String channelLayoutName = new String(channelLayoutData, 0, length);

String audioFilterArgs = "channel_layout="+ channelLayoutName +":"
+ "sample_fmt="+audioStreamParams.getCodecParameters().format()+":"
//When we use channel_layout first in the string, it throws error and I've encountered this problem upgrading to the ffmpeg 7.1.2-1.5.11-SNAPSHOT
//I've changed the order of the arguments and it worked.
//I don't have time to understand the cause of this problem. It's at least ok for me if they passed the tests at this stage
//I'm just proceeding to handle the other things(spaceport viewer) - mekya - Sep 9, 2024
String audioFilterArgs =
"sample_fmt="+audioStreamParams.getCodecParameters().format()+":"
+ "time_base="+audioStreamParams.getTimeBase().num()+"/"+audioStreamParams.getTimeBase().den()+":"
+ "sample_rate="+audioStreamParams.getCodecParameters().sample_rate();
+ "sample_rate="+audioStreamParams.getCodecParameters().sample_rate() + ":"
+ "channel_layout="+ channelLayoutName;


logger.info("Input audio arguments is \"{}\" for filter:{}", audioFilterArgs, filterId);

if(filterConfiguration.getAudioFilter().contains("["+"in"+i+"]")) {
Expand Down