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
6498549f
Commit
6498549f
authored
Oct 18, 2016
by
Jean Caillé
Committed by
Michael Niedermayer
Oct 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/mov: support gopro hero moments udta tag
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
1aa8fa41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
mov.c
libavformat/mov.c
+19
-0
No files found.
libavformat/mov.c
View file @
6498549f
...
...
@@ -268,6 +268,23 @@ static int mov_metadata_loci(MOVContext *c, AVIOContext *pb, unsigned len)
return
av_dict_set
(
&
c
->
fc
->
metadata
,
key
,
buf
,
0
);
}
static
int
mov_metadata_hmmt
(
MOVContext
*
c
,
AVIOContext
*
pb
,
unsigned
len
)
{
int
i
,
n_hmmt
;
if
(
len
<
2
)
return
0
;
if
(
c
->
ignore_chapters
)
return
0
;
n_hmmt
=
avio_rb32
(
pb
);
for
(
i
=
0
;
i
<
n_hmmt
&&
!
pb
->
eof_reached
;
i
++
)
{
int
moment_time
=
avio_rb32
(
pb
);
avpriv_new_chapter
(
c
->
fc
,
i
,
av_make_q
(
1
,
1000
),
moment_time
,
AV_NOPTS_VALUE
,
NULL
);
}
return
0
;
}
static
int
mov_read_udta_string
(
MOVContext
*
c
,
AVIOContext
*
pb
,
MOVAtom
atom
)
{
char
tmp_key
[
5
];
...
...
@@ -303,6 +320,8 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
parse
=
mov_metadata_gnre
;
break
;
case
MKTAG
(
'h'
,
'd'
,
'v'
,
'd'
):
key
=
"hd_video"
;
parse
=
mov_metadata_int8_no_padding
;
break
;
case
MKTAG
(
'H'
,
'M'
,
'M'
,
'T'
):
return
mov_metadata_hmmt
(
c
,
pb
,
atom
.
size
);
case
MKTAG
(
'k'
,
'e'
,
'y'
,
'w'
):
key
=
"keywords"
;
break
;
case
MKTAG
(
'l'
,
'd'
,
'e'
,
's'
):
key
=
"synopsis"
;
break
;
case
MKTAG
(
'l'
,
'o'
,
'c'
,
'i'
):
...
...
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