Skip to content

Commit 4817866

Browse files
committed
Remove redundant setter leading to channel layout warning message
1 parent e9fea00 commit 4817866

File tree

3 files changed

+60
-86
lines changed

3 files changed

+60
-86
lines changed

package-lock.json

Lines changed: 57 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "beamcoder",
3-
"version": "0.6.13",
3+
"version": "0.6.14",
44
"description": "Node.js native bindings to FFmpeg.",
55
"main": "index.js",
66
"types": "index.d.ts",
@@ -38,7 +38,7 @@
3838
"segfault-handler": "^1.3.0"
3939
},
4040
"devDependencies": {
41-
"eslint": "^7.24.0",
41+
"eslint": "^7.28.0",
4242
"tape": "^5.2.2"
4343
},
4444
"gypfile": true

src/filter.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -992,13 +992,7 @@ void filtererExecute(napi_env env, void* data) {
992992
}
993993
p = c->outParams[i].find("channel_layouts");
994994
if (p != c->outParams[i].end()) {
995-
const int64_t out_channel_layout = av_get_channel_layout(p->second.c_str());
996-
int out_channel_counts[] = { av_get_channel_layout_nb_channels(out_channel_layout), -1 };
997-
ret = av_opt_set_int_list(sinkCtx, "channel_counts", out_channel_counts, -1,
998-
AV_OPT_SEARCH_CHILDREN);
999-
if (ret < 0) { av_log(NULL, AV_LOG_ERROR, "Cannot set output channel count\n"); }
1000-
1001-
const int64_t out_channel_layouts[] = { out_channel_layout, -1 };
995+
const int64_t out_channel_layouts[] = { (int64_t)av_get_channel_layout(p->second.c_str()), -1 };
1002996
ret = av_opt_set_int_list(sinkCtx, "channel_layouts", out_channel_layouts, -1,
1003997
AV_OPT_SEARCH_CHILDREN);
1004998
if (ret < 0) { av_log(NULL, AV_LOG_ERROR, "Cannot set output channel layout\n"); }

0 commit comments

Comments
 (0)