提交 43c2c6dd authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-6815 FS-6903 #resolve

上级 855cc4b4
......@@ -175,15 +175,6 @@ int main(int argc, char *argv[])
}
if (switch_core_file_open(&fh_output, output, channels, rate, out_flags, NULL) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Couldn't open %s\n", output);
goto end;
}
if (switch_test_flag(&fh_input, SWITCH_FILE_NATIVE)) {
in_asis = 1;
}
if (out_asis) {
if (switch_core_codec_init_with_bitrate(&codec, format, fmtp, rate, ptime, channels, bitrate, SWITCH_CODEC_FLAG_ENCODE, NULL, pool) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Couldn't initialize codec for %s@%dh@%di\n", format, rate, ptime);
......@@ -206,6 +197,20 @@ int main(int argc, char *argv[])
}
}
if (switch_core_file_open(&fh_output, output, channels, codec.implementation->actual_samples_per_second, out_flags, NULL) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Couldn't open %s\n", output);
goto end;
}
if (switch_test_flag(&fh_input, SWITCH_FILE_NATIVE)) {
in_asis = 1;
}
if (in_asis) {
blocksize = len = codec.implementation->encoded_bytes_per_packet;
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论