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
1607f774
Commit
1607f774
authored
May 30, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mov: Append place name instead of overwriting for loci
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
4dd22531
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mov.c
libavformat/mov.c
+3
-3
No files found.
libavformat/mov.c
View file @
1607f774
...
@@ -206,7 +206,7 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len)
...
@@ -206,7 +206,7 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len)
static
int
mov_metadata_loci
(
MOVContext
*
c
,
AVIOContext
*
pb
,
unsigned
len
)
static
int
mov_metadata_loci
(
MOVContext
*
c
,
AVIOContext
*
pb
,
unsigned
len
)
{
{
char
language
[
4
]
=
{
0
};
char
language
[
4
]
=
{
0
};
char
buf
[
100
];
char
buf
[
200
],
place
[
100
];
uint16_t
langcode
=
0
;
uint16_t
langcode
=
0
;
double
longitude
,
latitude
;
double
longitude
,
latitude
;
const
char
*
key
=
"location"
;
const
char
*
key
=
"location"
;
...
@@ -221,7 +221,7 @@ static int mov_metadata_loci(MOVContext *c, AVIOContext *pb, unsigned len)
...
@@ -221,7 +221,7 @@ static int mov_metadata_loci(MOVContext *c, AVIOContext *pb, unsigned len)
ff_mov_lang_to_iso639
(
langcode
,
language
);
ff_mov_lang_to_iso639
(
langcode
,
language
);
len
-=
6
;
len
-=
6
;
len
-=
avio_get_str
(
pb
,
len
,
buf
,
sizeof
(
buf
));
// place name
len
-=
avio_get_str
(
pb
,
len
,
place
,
sizeof
(
place
));
if
(
len
<
1
)
{
if
(
len
<
1
)
{
av_log
(
c
->
fc
,
AV_LOG_ERROR
,
"place name too long
\n
"
);
av_log
(
c
->
fc
,
AV_LOG_ERROR
,
"place name too long
\n
"
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
...
@@ -237,7 +237,7 @@ static int mov_metadata_loci(MOVContext *c, AVIOContext *pb, unsigned len)
...
@@ -237,7 +237,7 @@ static int mov_metadata_loci(MOVContext *c, AVIOContext *pb, unsigned len)
latitude
=
((
int32_t
)
avio_rb32
(
pb
))
/
(
float
)
(
1
<<
16
);
latitude
=
((
int32_t
)
avio_rb32
(
pb
))
/
(
float
)
(
1
<<
16
);
// Try to output in the same format as the ?xyz field
// Try to output in the same format as the ?xyz field
snprintf
(
buf
,
sizeof
(
buf
),
"%+08.4f%+09.4f/
"
,
latitude
,
longitud
e
);
snprintf
(
buf
,
sizeof
(
buf
),
"%+08.4f%+09.4f/
%s"
,
latitude
,
longitude
,
plac
e
);
if
(
*
language
&&
strcmp
(
language
,
"und"
))
{
if
(
*
language
&&
strcmp
(
language
,
"und"
))
{
char
key2
[
16
];
char
key2
[
16
];
snprintf
(
key2
,
sizeof
(
key2
),
"%s-%s"
,
key
,
language
);
snprintf
(
key2
,
sizeof
(
key2
),
"%s-%s"
,
key
,
language
);
...
...
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