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
f1e626a3
Commit
f1e626a3
authored
Aug 07, 2014
by
Mark Reid
Committed by
Michael Niedermayer
Aug 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mov: read reel_name metadata from tmcd atom
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
92a28e9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
mov.c
libavformat/mov.c
+20
-0
No files found.
libavformat/mov.c
View file @
f1e626a3
...
@@ -1531,6 +1531,26 @@ static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb,
...
@@ -1531,6 +1531,26 @@ static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb,
st
->
codec
->
flags2
|=
CODEC_FLAG2_DROP_FRAME_TIMECODE
;
st
->
codec
->
flags2
|=
CODEC_FLAG2_DROP_FRAME_TIMECODE
;
st
->
codec
->
time_base
.
den
=
st
->
codec
->
extradata
[
16
];
/* number of frame */
st
->
codec
->
time_base
.
den
=
st
->
codec
->
extradata
[
16
];
/* number of frame */
st
->
codec
->
time_base
.
num
=
1
;
st
->
codec
->
time_base
.
num
=
1
;
if
(
size
>
30
)
{
uint32_t
len
=
AV_RB32
(
st
->
codec
->
extradata
+
18
);
/* name atom length */
uint32_t
format
=
AV_RB32
(
st
->
codec
->
extradata
+
22
);
if
(
format
==
AV_RB32
(
"name"
)
&&
(
int64_t
)
size
>=
(
int64_t
)
len
+
18
)
{
uint16_t
str_size
=
AV_RB16
(
st
->
codec
->
extradata
+
26
);
/* string length */
if
(
str_size
>
0
&&
size
>=
(
int
)
str_size
+
26
)
{
char
*
reel_name
=
av_malloc
(
str_size
+
1
);
if
(
!
reel_name
)
return
AVERROR
(
ENOMEM
);
memcpy
(
reel_name
,
st
->
codec
->
extradata
+
30
,
str_size
);
reel_name
[
str_size
]
=
0
;
/* Add null terminator */
/* don't add reel_name if emtpy string */
if
(
*
reel_name
==
0
)
{
av_free
(
reel_name
);
}
else
{
av_dict_set
(
&
st
->
metadata
,
"reel_name"
,
reel_name
,
AV_DICT_DONT_STRDUP_VAL
);
}
}
}
}
}
}
}
else
{
}
else
{
/* other codec type, just skip (rtp, mp4s ...) */
/* other codec type, just skip (rtp, mp4s ...) */
...
...
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