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
a74f8121
Commit
a74f8121
authored
Oct 11, 2014
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mov: Handle tfdt atoms
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
c2c22c75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
mov.c
libavformat/mov.c
+31
-0
No files found.
libavformat/mov.c
View file @
a74f8121
...
...
@@ -2618,6 +2618,36 @@ static int mov_read_trex(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return
0
;
}
static
int
mov_read_tfdt
(
MOVContext
*
c
,
AVIOContext
*
pb
,
MOVAtom
atom
)
{
MOVFragment
*
frag
=
&
c
->
fragment
;
AVStream
*
st
=
NULL
;
MOVStreamContext
*
sc
;
int
version
,
i
;
for
(
i
=
0
;
i
<
c
->
fc
->
nb_streams
;
i
++
)
{
if
(
c
->
fc
->
streams
[
i
]
->
id
==
frag
->
track_id
)
{
st
=
c
->
fc
->
streams
[
i
];
break
;
}
}
if
(
!
st
)
{
av_log
(
c
->
fc
,
AV_LOG_ERROR
,
"could not find corresponding track id %d
\n
"
,
frag
->
track_id
);
return
AVERROR_INVALIDDATA
;
}
sc
=
st
->
priv_data
;
if
(
sc
->
pseudo_stream_id
+
1
!=
frag
->
stsd_id
)
return
0
;
version
=
avio_r8
(
pb
);
avio_rb24
(
pb
);
/* flags */
if
(
version
)
{
sc
->
track_end
=
avio_rb64
(
pb
);
}
else
{
sc
->
track_end
=
avio_rb32
(
pb
);
}
return
0
;
}
static
int
mov_read_trun
(
MOVContext
*
c
,
AVIOContext
*
pb
,
MOVAtom
atom
)
{
MOVFragment
*
frag
=
&
c
->
fragment
;
...
...
@@ -2870,6 +2900,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = {
{
MKTAG
(
's'
,
't'
,
't'
,
's'
),
mov_read_stts
},
{
MKTAG
(
's'
,
't'
,
'z'
,
'2'
),
mov_read_stsz
},
/* compact sample size */
{
MKTAG
(
't'
,
'k'
,
'h'
,
'd'
),
mov_read_tkhd
},
/* track header */
{
MKTAG
(
't'
,
'f'
,
'd'
,
't'
),
mov_read_tfdt
},
{
MKTAG
(
't'
,
'f'
,
'h'
,
'd'
),
mov_read_tfhd
},
/* track fragment header */
{
MKTAG
(
't'
,
'r'
,
'a'
,
'k'
),
mov_read_trak
},
{
MKTAG
(
't'
,
'r'
,
'a'
,
'f'
),
mov_read_default
},
...
...
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