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
04295054
Commit
04295054
authored
Jan 27, 2011
by
Anton Khirnov
Committed by
Janne Grunau
Jan 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asfdec: ensure that the whole tag is read.
Signed-off-by:
Janne Grunau
<
janne-ffmpeg@jannau.net
>
parent
362d8f7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
asfdec.c
libavformat/asfdec.c
+5
-4
No files found.
libavformat/asfdec.c
View file @
04295054
...
...
@@ -125,13 +125,14 @@ static int get_value(ByteIOContext *pb, int type){
static
void
get_tag
(
AVFormatContext
*
s
,
const
char
*
key
,
int
type
,
int
len
)
{
char
*
value
;
int64_t
off
=
url_ftell
(
s
->
pb
);
if
((
unsigned
)
len
>=
(
UINT_MAX
-
1
)
/
2
)
return
;
value
=
av_malloc
(
2
*
len
+
1
);
if
(
!
value
)
return
;
goto
finish
;
if
(
type
==
0
)
{
// UTF16-LE
avio_get_str16le
(
s
->
pb
,
len
,
value
,
2
*
len
+
1
);
...
...
@@ -139,13 +140,13 @@ static void get_tag(AVFormatContext *s, const char *key, int type, int len)
uint64_t
num
=
get_value
(
s
->
pb
,
type
);
snprintf
(
value
,
len
,
"%"
PRIu64
,
num
);
}
else
{
url_fskip
(
s
->
pb
,
len
);
av_freep
(
&
value
);
av_log
(
s
,
AV_LOG_DEBUG
,
"Unsupported value type %d in tag %s.
\n
"
,
type
,
key
);
return
;
goto
finish
;
}
av_metadata_set2
(
&
s
->
metadata
,
key
,
value
,
0
);
finish
:
av_freep
(
&
value
);
url_fseek
(
s
->
pb
,
off
+
len
,
SEEK_SET
);
}
static
int
asf_read_header
(
AVFormatContext
*
s
,
AVFormatParameters
*
ap
)
...
...
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