Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
edb50856
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,发现更多精彩内容 >>
提交
edb50856
编写于
11月 11, 2011
作者:
T
Tomas Härdin
提交者:
Janne Grunau
1月 22, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mxfdec: Add hack that adjusts the n_delta calculation when system items are present.
Signed-off-by:
N
Janne Grunau
<
janne-libav@jannau.net
>
上级
682b6db7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
1 deletion
+8
-1
libavformat/mxfdec.c
libavformat/mxfdec.c
+8
-1
未找到文件。
libavformat/mxfdec.c
浏览文件 @
edb50856
...
@@ -181,6 +181,7 @@ typedef struct {
...
@@ -181,6 +181,7 @@ typedef struct {
uint8_t
*
local_tags
;
uint8_t
*
local_tags
;
int
local_tags_count
;
int
local_tags_count
;
uint64_t
footer_partition
;
uint64_t
footer_partition
;
int
system_item
;
int64_t
essence_offset
;
int64_t
essence_offset
;
int
first_essence_kl_length
;
int
first_essence_kl_length
;
int64_t
first_essence_length
;
int64_t
first_essence_length
;
...
@@ -205,6 +206,7 @@ typedef struct {
...
@@ -205,6 +206,7 @@ typedef struct {
/* partial keys to match */
/* partial keys to match */
static
const
uint8_t
mxf_header_partition_pack_key
[]
=
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x05
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x02
,
0x01
,
0x01
,
0x02
};
static
const
uint8_t
mxf_header_partition_pack_key
[]
=
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x05
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x02
,
0x01
,
0x01
,
0x02
};
static
const
uint8_t
mxf_essence_element_key
[]
=
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x01
,
0x02
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x03
,
0x01
};
static
const
uint8_t
mxf_essence_element_key
[]
=
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x01
,
0x02
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x03
,
0x01
};
static
const
uint8_t
mxf_system_item_key
[]
=
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x02
,
0x05
,
0x01
,
0x01
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x04
};
static
const
uint8_t
mxf_klv_key
[]
=
{
0x06
,
0x0e
,
0x2b
,
0x34
};
static
const
uint8_t
mxf_klv_key
[]
=
{
0x06
,
0x0e
,
0x2b
,
0x34
};
/* complete keys to match */
/* complete keys to match */
static
const
uint8_t
mxf_crypto_source_container_ul
[]
=
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x01
,
0x01
,
0x01
,
0x09
,
0x06
,
0x01
,
0x01
,
0x02
,
0x02
,
0x00
,
0x00
,
0x00
};
static
const
uint8_t
mxf_crypto_source_container_ul
[]
=
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x01
,
0x01
,
0x01
,
0x09
,
0x06
,
0x01
,
0x01
,
0x02
,
0x02
,
0x00
,
0x00
,
0x00
};
...
@@ -990,7 +992,7 @@ static int mxf_parse_index(MXFContext *mxf, int i, AVStream *st)
...
@@ -990,7 +992,7 @@ static int mxf_parse_index(MXFContext *mxf, int i, AVStream *st)
accumulated_offset
=
0
;
accumulated_offset
=
0
;
/* HACK: How to correctly link between streams and slices? */
/* HACK: How to correctly link between streams and slices? */
if
(
i
<
st
->
index
)
if
(
i
<
mxf
->
system_item
+
st
->
index
)
n_delta
++
;
n_delta
++
;
if
(
n_delta
>=
tableseg
->
nb_delta_entries
&&
st
->
index
!=
0
)
if
(
n_delta
>=
tableseg
->
nb_delta_entries
&&
st
->
index
!=
0
)
continue
;
continue
;
...
@@ -1356,6 +1358,11 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -1356,6 +1358,11 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
avio_seek
(
s
->
pb
,
klv
.
offset
,
SEEK_SET
);
avio_seek
(
s
->
pb
,
klv
.
offset
,
SEEK_SET
);
break
;
break
;
}
}
if
(
IS_KLV_KEY
(
klv
.
key
,
mxf_system_item_key
))
{
mxf
->
system_item
=
1
;
avio_skip
(
s
->
pb
,
klv
.
length
);
continue
;
}
for
(
metadata
=
mxf_metadata_read_table
;
metadata
->
read
;
metadata
++
)
{
for
(
metadata
=
mxf_metadata_read_table
;
metadata
->
read
;
metadata
++
)
{
if
(
IS_KLV_KEY
(
klv
.
key
,
metadata
->
key
))
{
if
(
IS_KLV_KEY
(
klv
.
key
,
metadata
->
key
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录