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
7a9af8ec
Commit
7a9af8ec
authored
Feb 05, 2010
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support strn tag in avidec.
Originally committed as revision 21643 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
1ac08937
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
avidec.c
libavformat/avidec.c
+19
-9
No files found.
libavformat/avidec.c
View file @
7a9af8ec
...
...
@@ -227,7 +227,7 @@ static void clean_index(AVFormatContext *s){
}
}
static
int
avi_read_tag
(
AVFormatContext
*
s
,
const
char
*
key
,
unsigned
int
size
)
static
int
avi_read_tag
(
AVFormatContext
*
s
,
AVStream
*
st
,
const
char
*
key
,
unsigned
int
size
)
{
ByteIOContext
*
pb
=
s
->
pb
;
char
*
value
;
...
...
@@ -239,8 +239,13 @@ static int avi_read_tag(AVFormatContext *s, const char *key, unsigned int size)
value
=
av_malloc
(
size
+
1
);
if
(
!
value
)
return
-
1
;
get_strz
(
pb
,
value
,
size
);
get_buffer
(
pb
,
value
,
size
);
value
[
size
]
=
0
;
if
(
st
)
return
av_metadata_set2
(
&
st
->
metadata
,
key
,
value
,
AV_METADATA_DONT_STRDUP_VAL
);
else
return
av_metadata_set2
(
&
s
->
metadata
,
key
,
value
,
AV_METADATA_DONT_STRDUP_VAL
);
}
...
...
@@ -602,26 +607,31 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
url_fseek
(
pb
,
size
,
SEEK_CUR
);
break
;
case
MKTAG
(
'I'
,
'N'
,
'A'
,
'M'
):
avi_read_tag
(
s
,
"Title"
,
size
);
avi_read_tag
(
s
,
NULL
,
"Title"
,
size
);
break
;
case
MKTAG
(
'I'
,
'A'
,
'R'
,
'T'
):
avi_read_tag
(
s
,
"Artist"
,
size
);
avi_read_tag
(
s
,
NULL
,
"Artist"
,
size
);
break
;
case
MKTAG
(
'I'
,
'C'
,
'O'
,
'P'
):
avi_read_tag
(
s
,
"Copyright"
,
size
);
avi_read_tag
(
s
,
NULL
,
"Copyright"
,
size
);
break
;
case
MKTAG
(
'I'
,
'C'
,
'M'
,
'T'
):
avi_read_tag
(
s
,
"Comment"
,
size
);
avi_read_tag
(
s
,
NULL
,
"Comment"
,
size
);
break
;
case
MKTAG
(
'I'
,
'G'
,
'N'
,
'R'
):
avi_read_tag
(
s
,
"Genre"
,
size
);
avi_read_tag
(
s
,
NULL
,
"Genre"
,
size
);
break
;
case
MKTAG
(
'I'
,
'P'
,
'R'
,
'D'
):
avi_read_tag
(
s
,
"Album"
,
size
);
avi_read_tag
(
s
,
NULL
,
"Album"
,
size
);
break
;
case
MKTAG
(
'I'
,
'P'
,
'R'
,
'T'
):
avi_read_tag
(
s
,
"Track"
,
size
);
avi_read_tag
(
s
,
NULL
,
"Track"
,
size
);
break
;
case
MKTAG
(
's'
,
't'
,
'r'
,
'n'
):
if
(
s
->
nb_streams
){
avi_read_tag
(
s
,
s
->
streams
[
s
->
nb_streams
-
1
],
"Title"
,
size
);
break
;
}
default
:
if
(
size
>
1000000
){
av_log
(
s
,
AV_LOG_ERROR
,
"Something went wrong during header parsing, "
...
...
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