Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
c11ca610
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c11ca610
编写于
6月 23, 2017
作者:
K
Kyle Swanson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avcodec/g722enc: force mono channel layout
Signed-off-by:
N
Kyle Swanson
<
k@ylo.ph
>
上级
3c702517
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
16 deletion
+11
-16
libavcodec/g722enc.c
libavcodec/g722enc.c
+11
-16
未找到文件。
libavcodec/g722enc.c
浏览文件 @
c11ca610
...
...
@@ -61,11 +61,6 @@ static av_cold int g722_encode_init(AVCodecContext * avctx)
G722Context
*
c
=
avctx
->
priv_data
;
int
ret
;
if
(
avctx
->
channels
!=
1
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Only mono tracks are allowed.
\n
"
);
return
AVERROR_INVALIDDATA
;
}
c
->
band
[
0
].
scale_factor
=
8
;
c
->
band
[
1
].
scale_factor
=
2
;
c
->
prev_samples_pos
=
22
;
...
...
@@ -381,15 +376,15 @@ static int g722_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
}
AVCodec
ff_adpcm_g722_encoder
=
{
.
name
=
"g722"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"G.722 ADPCM"
),
.
type
=
AVMEDIA_TYPE_AUDIO
,
.
id
=
AV_CODEC_ID_ADPCM_G722
,
.
priv_data_size
=
sizeof
(
G722Context
),
.
init
=
g722_encode_init
,
.
close
=
g722_encode_close
,
.
encode2
=
g722_encode_frame
,
.
capabilities
=
AV_CODEC_CAP_SMALL_LAST_FRAME
,
.
sample_fmts
=
(
const
enum
AVSampleFormat
[]){
AV_SAMPLE_FMT_S16
,
AV_SAMPLE_FMT_NONE
},
.
name
=
"g722"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"G.722 ADPCM"
),
.
type
=
AVMEDIA_TYPE_AUDIO
,
.
id
=
AV_CODEC_ID_ADPCM_G722
,
.
priv_data_size
=
sizeof
(
G722Context
),
.
init
=
g722_encode_init
,
.
close
=
g722_encode_close
,
.
encode2
=
g722_encode_frame
,
.
capabilities
=
AV_CODEC_CAP_SMALL_LAST_FRAME
,
.
sample_fmts
=
(
const
enum
AVSampleFormat
[]){
AV_SAMPLE_FMT_S16
,
AV_SAMPLE_FMT_NONE
}
,
.
channel_layouts
=
(
const
uint64_t
[]){
AV_CH_LAYOUT_MONO
,
0
},
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录