Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
83ab10f6
Commit
83ab10f6
authored
Oct 07, 2011
by
Tomas Härdin
Committed by
Janne Grunau
Jan 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mxfdec: Move FooterPartition to MXFContext and make sure it is never zero.
Signed-off-by:
Janne Grunau
<
janne-libav@jannau.net
>
parent
3359246d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
mxfdec.c
libavformat/mxfdec.c
+14
-3
No files found.
libavformat/mxfdec.c
View file @
83ab10f6
...
@@ -76,7 +76,6 @@ typedef struct {
...
@@ -76,7 +76,6 @@ typedef struct {
int
complete
;
int
complete
;
MXFPartitionType
type
;
MXFPartitionType
type
;
uint64_t
previous_partition
;
uint64_t
previous_partition
;
uint64_t
footer_partition
;
int
index_sid
;
int
index_sid
;
int
body_sid
;
int
body_sid
;
}
MXFPartition
;
}
MXFPartition
;
...
@@ -167,6 +166,7 @@ typedef struct {
...
@@ -167,6 +166,7 @@ typedef struct {
struct
AVAES
*
aesc
;
struct
AVAES
*
aesc
;
uint8_t
*
local_tags
;
uint8_t
*
local_tags
;
int
local_tags_count
;
int
local_tags_count
;
uint64_t
footer_partition
;
}
MXFContext
;
}
MXFContext
;
enum
MXFWrappingScheme
{
enum
MXFWrappingScheme
{
...
@@ -413,6 +413,7 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
...
@@ -413,6 +413,7 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
MXFContext
*
mxf
=
arg
;
MXFContext
*
mxf
=
arg
;
MXFPartition
*
partition
;
MXFPartition
*
partition
;
UID
op
;
UID
op
;
uint64_t
footer_partition
;
if
(
mxf
->
partitions_count
+
1
>=
UINT_MAX
/
sizeof
(
*
mxf
->
partitions
))
if
(
mxf
->
partitions_count
+
1
>=
UINT_MAX
/
sizeof
(
*
mxf
->
partitions
))
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
...
@@ -443,16 +444,26 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
...
@@ -443,16 +444,26 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
partition
->
complete
=
uid
[
14
]
>
2
;
partition
->
complete
=
uid
[
14
]
>
2
;
avio_skip
(
pb
,
16
);
avio_skip
(
pb
,
16
);
partition
->
previous_partition
=
avio_rb64
(
pb
);
partition
->
previous_partition
=
avio_rb64
(
pb
);
partition
->
footer_partition
=
avio_rb64
(
pb
);
footer_partition
=
avio_rb64
(
pb
);
avio_skip
(
pb
,
16
);
avio_skip
(
pb
,
16
);
partition
->
index_sid
=
avio_rb32
(
pb
);
partition
->
index_sid
=
avio_rb32
(
pb
);
avio_skip
(
pb
,
8
);
avio_skip
(
pb
,
8
);
partition
->
body_sid
=
avio_rb32
(
pb
);
partition
->
body_sid
=
avio_rb32
(
pb
);
avio_read
(
pb
,
op
,
sizeof
(
UID
));
avio_read
(
pb
,
op
,
sizeof
(
UID
));
/* some files don'thave FooterPartition set in every partition */
if
(
footer_partition
)
{
if
(
mxf
->
footer_partition
&&
mxf
->
footer_partition
!=
footer_partition
)
{
av_log
(
mxf
->
fc
,
AV_LOG_ERROR
,
"inconsistent FooterPartition value: %li != %li
\n
"
,
mxf
->
footer_partition
,
footer_partition
);
}
else
{
mxf
->
footer_partition
=
footer_partition
;
}
}
av_dlog
(
mxf
->
fc
,
"PartitionPack: PreviousPartition = 0x%lx, "
av_dlog
(
mxf
->
fc
,
"PartitionPack: PreviousPartition = 0x%lx, "
"FooterPartition = 0x%lx, IndexSID = %i, BodySID = %i
\n
"
,
"FooterPartition = 0x%lx, IndexSID = %i, BodySID = %i
\n
"
,
partition
->
previous_partition
,
partition
->
footer_partition
,
partition
->
previous_partition
,
footer_partition
,
partition
->
index_sid
,
partition
->
body_sid
);
partition
->
index_sid
,
partition
->
body_sid
);
if
(
op
[
12
]
==
1
&&
op
[
13
]
==
1
)
mxf
->
op
=
OP1a
;
if
(
op
[
12
]
==
1
&&
op
[
13
]
==
1
)
mxf
->
op
=
OP1a
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment