Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
cd4d6cba
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,发现更多精彩内容 >>
提交
cd4d6cba
编写于
3月 27, 2017
作者:
C
Clément Bœsch
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lavf: fix usages of av_get_codec_tag_string()
上级
67e370ee
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
16 addition
and
37 deletion
+16
-37
libavformat/aiffdec.c
libavformat/aiffdec.c
+3
-5
libavformat/apngdec.c
libavformat/apngdec.c
+2
-6
libavformat/avidec.c
libavformat/avidec.c
+2
-6
libavformat/matroskadec.c
libavformat/matroskadec.c
+2
-5
libavformat/movenc.c
libavformat/movenc.c
+1
-5
libavformat/mux.c
libavformat/mux.c
+3
-4
libavformat/rsd.c
libavformat/rsd.c
+1
-3
libavformat/wavdec.c
libavformat/wavdec.c
+2
-3
未找到文件。
libavformat/aiffdec.c
浏览文件 @
cd4d6cba
...
...
@@ -128,11 +128,9 @@ static int get_aiff_header(AVFormatContext *s, int size,
}
else
if
(
version
==
AIFF_C_VERSION1
)
{
par
->
codec_tag
=
avio_rl32
(
pb
);
par
->
codec_id
=
ff_codec_get_id
(
ff_codec_aiff_tags
,
par
->
codec_tag
);
if
(
par
->
codec_id
==
AV_CODEC_ID_NONE
)
{
char
tag
[
32
];
av_get_codec_tag_string
(
tag
,
sizeof
(
tag
),
par
->
codec_tag
);
avpriv_request_sample
(
s
,
"unknown or unsupported codec tag: %s"
,
tag
);
}
if
(
par
->
codec_id
==
AV_CODEC_ID_NONE
)
avpriv_request_sample
(
s
,
"unknown or unsupported codec tag: %s"
,
av_fourcc2str
(
par
->
codec_tag
));
size
-=
4
;
}
...
...
libavformat/apngdec.c
浏览文件 @
cd4d6cba
...
...
@@ -404,14 +404,10 @@ static int apng_read_packet(AVFormatContext *s, AVPacket *pkt)
return
ret
;
return
0
;
default:
{
char
tag_buf
[
32
];
av_get_codec_tag_string
(
tag_buf
,
sizeof
(
tag_buf
),
tag
);
avpriv_request_sample
(
s
,
"In-stream tag=%s (0x%08X) len=%"
PRIu32
,
tag_buf
,
tag
,
len
);
avpriv_request_sample
(
s
,
"In-stream tag=%s (0x%08X) len=%"
PRIu32
,
av_fourcc2str
(
tag
),
tag
,
len
);
avio_skip
(
pb
,
len
+
4
);
}
}
/* Handle the unsupported yet cases */
return
AVERROR_PATCHWELCOME
;
...
...
libavformat/avidec.c
浏览文件 @
cd4d6cba
...
...
@@ -811,14 +811,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
tag1
);
/* If codec is not found yet, try with the mov tags. */
if
(
!
st
->
codecpar
->
codec_id
)
{
char
tag_buf
[
32
];
av_get_codec_tag_string
(
tag_buf
,
sizeof
(
tag_buf
),
tag1
);
st
->
codecpar
->
codec_id
=
ff_codec_get_id
(
ff_codec_movvideo_tags
,
tag1
);
if
(
st
->
codecpar
->
codec_id
)
av_log
(
s
,
AV_LOG_WARNING
,
"mov tag found in avi (fourcc %s)
\n
"
,
tag_buf
);
av_fourcc2str
(
tag1
)
);
}
/* This is needed to get the pict type which is necessary
* for generating correct pts. */
...
...
@@ -992,13 +990,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
default:
if
(
size
>
1000000
)
{
char
tag_buf
[
32
];
av_get_codec_tag_string
(
tag_buf
,
sizeof
(
tag_buf
),
tag
);
av_log
(
s
,
AV_LOG_ERROR
,
"Something went wrong during header parsing, "
"tag %s has size %u, "
"I will ignore it and try to continue anyway.
\n
"
,
tag_buf
,
size
);
av_fourcc2str
(
tag
)
,
size
);
if
(
s
->
error_recognition
&
AV_EF_EXPLODE
)
goto
fail
;
avi
->
movi_list
=
avio_tell
(
pb
)
-
4
;
...
...
libavformat/matroskadec.c
浏览文件 @
cd4d6cba
...
...
@@ -2212,12 +2212,9 @@ static int matroska_parse_tracks(AVFormatContext *s)
fourcc
=
MKTAG
(
'S'
,
'V'
,
'Q'
,
'3'
);
codec_id
=
ff_codec_get_id
(
ff_codec_movvideo_tags
,
fourcc
);
}
if
(
codec_id
==
AV_CODEC_ID_NONE
)
{
char
buf
[
32
];
av_get_codec_tag_string
(
buf
,
sizeof
(
buf
),
fourcc
);
if
(
codec_id
==
AV_CODEC_ID_NONE
)
av_log
(
matroska
->
ctx
,
AV_LOG_ERROR
,
"mov FourCC not found %s.
\n
"
,
buf
);
}
"mov FourCC not found %s.
\n
"
,
av_fourcc2str
(
fourcc
));
if
(
track
->
codec_priv
.
size
>=
86
)
{
bit_depth
=
AV_RB16
(
track
->
codec_priv
.
data
+
82
);
ffio_init_context
(
&
b
,
track
->
codec_priv
.
data
,
...
...
libavformat/movenc.c
浏览文件 @
cd4d6cba
...
...
@@ -2377,13 +2377,9 @@ static int mov_write_hdlr_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra
hdlr_type
=
"tmcd"
;
descr
=
"TimeCodeHandler"
;
}
else
{
char
tag_buf
[
32
];
av_get_codec_tag_string
(
tag_buf
,
sizeof
(
tag_buf
),
track
->
par
->
codec_tag
);
av_log
(
s
,
AV_LOG_WARNING
,
"Unknown hldr_type for %s / 0x%04X, writing dummy values
\n
"
,
tag_buf
,
track
->
par
->
codec_tag
);
av_fourcc2str
(
track
->
par
->
codec_tag
)
,
track
->
par
->
codec_tag
);
}
if
(
track
->
st
)
{
// hdlr.name is used by some players to identify the content title
...
...
libavformat/mux.c
浏览文件 @
cd4d6cba
...
...
@@ -370,12 +370,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
if
(
par
->
codec_tag
)
{
if
(
!
validate_codec_tag
(
s
,
st
))
{
char
tagbuf
[
32
],
tagbuf2
[
32
];
av_get_codec_tag_string
(
tagbuf
,
sizeof
(
tagbuf
),
par
->
codec_tag
);
av_get_codec_tag_string
(
tagbuf2
,
sizeof
(
tagbuf2
),
av_codec_get_tag
(
s
->
oformat
->
codec_tag
,
par
->
codec_id
));
const
uint32_t
otag
=
av_codec_get_tag
(
s
->
oformat
->
codec_tag
,
par
->
codec_id
);
av_log
(
s
,
AV_LOG_ERROR
,
"Tag %s/0x%08x incompatible with output codec id '%d' (%s)
\n
"
,
tagbuf
,
par
->
codec_tag
,
par
->
codec_id
,
tagbuf2
);
av_fourcc2str
(
par
->
codec_tag
),
par
->
codec_tag
,
par
->
codec_id
,
av_fourcc2str
(
otag
));
ret
=
AVERROR_INVALIDDATA
;
goto
fail
;
}
...
...
libavformat/rsd.c
浏览文件 @
cd4d6cba
...
...
@@ -70,9 +70,7 @@ static int rsd_read_header(AVFormatContext *s)
par
->
codec_tag
=
avio_rl32
(
pb
);
par
->
codec_id
=
ff_codec_get_id
(
rsd_tags
,
par
->
codec_tag
);
if
(
!
par
->
codec_id
)
{
char
tag_buf
[
32
];
av_get_codec_tag_string
(
tag_buf
,
sizeof
(
tag_buf
),
par
->
codec_tag
);
const
char
*
tag_buf
=
av_fourcc2str
(
par
->
codec_tag
);
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
rsd_unsupported_tags
);
i
++
)
{
if
(
par
->
codec_tag
==
rsd_unsupported_tags
[
i
])
{
avpriv_request_sample
(
s
,
"Codec tag: %s"
,
tag_buf
);
...
...
libavformat/wavdec.c
浏览文件 @
cd4d6cba
...
...
@@ -323,7 +323,6 @@ static int wav_read_header(AVFormatContext *s)
int64_t
size
,
av_uninit
(
data_size
);
int64_t
sample_count
=
0
;
int
rf64
=
0
;
char
start_code
[
32
];
uint32_t
tag
;
AVIOContext
*
pb
=
s
->
pb
;
AVStream
*
st
=
NULL
;
...
...
@@ -347,8 +346,8 @@ static int wav_read_header(AVFormatContext *s)
rf64
=
1
;
break
;
default:
av_
get_codec_tag_string
(
start_code
,
sizeof
(
start_code
),
tag
);
av_log
(
s
,
AV_LOG_ERROR
,
"invalid start code %s in RIFF header
\n
"
,
start_code
);
av_
log
(
s
,
AV_LOG_ERROR
,
"invalid start code %s in RIFF header
\n
"
,
av_fourcc2str
(
tag
)
);
return
AVERROR_INVALIDDATA
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录