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
f69befe5
Commit
f69befe5
authored
Mar 07, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
matroskadec: cosmetics: Fix "attachement" vs. "attachment" typo
parent
84cfce9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
matroskadec.c
libavformat/matroskadec.c
+22
-22
No files found.
libavformat/matroskadec.c
View file @
f69befe5
...
...
@@ -166,7 +166,7 @@ typedef struct {
EbmlBin
bin
;
AVStream
*
stream
;
}
MatroskaAttach
e
ment
;
}
MatroskaAttachment
;
typedef
struct
{
uint64_t
start
;
...
...
@@ -379,16 +379,16 @@ static EbmlSyntax matroska_tracks[] = {
};
static
EbmlSyntax
matroska_attachment
[]
=
{
{
MATROSKA_ID_FILEUID
,
EBML_UINT
,
0
,
offsetof
(
MatroskaAttach
e
ment
,
uid
)
},
{
MATROSKA_ID_FILENAME
,
EBML_UTF8
,
0
,
offsetof
(
MatroskaAttach
e
ment
,
filename
)
},
{
MATROSKA_ID_FILEMIMETYPE
,
EBML_STR
,
0
,
offsetof
(
MatroskaAttach
e
ment
,
mime
)
},
{
MATROSKA_ID_FILEDATA
,
EBML_BIN
,
0
,
offsetof
(
MatroskaAttach
e
ment
,
bin
)
},
{
MATROSKA_ID_FILEUID
,
EBML_UINT
,
0
,
offsetof
(
MatroskaAttachment
,
uid
)
},
{
MATROSKA_ID_FILENAME
,
EBML_UTF8
,
0
,
offsetof
(
MatroskaAttachment
,
filename
)
},
{
MATROSKA_ID_FILEMIMETYPE
,
EBML_STR
,
0
,
offsetof
(
MatroskaAttachment
,
mime
)
},
{
MATROSKA_ID_FILEDATA
,
EBML_BIN
,
0
,
offsetof
(
MatroskaAttachment
,
bin
)
},
{
MATROSKA_ID_FILEDESC
,
EBML_NONE
},
{
0
}
};
static
EbmlSyntax
matroska_attachments
[]
=
{
{
MATROSKA_ID_ATTACHEDFILE
,
EBML_NEST
,
sizeof
(
MatroskaAttach
e
ment
),
offsetof
(
MatroskaDemuxContext
,
attachments
),
{
.
n
=
matroska_attachment
}
},
{
MATROSKA_ID_ATTACHEDFILE
,
EBML_NEST
,
sizeof
(
MatroskaAttachment
),
offsetof
(
MatroskaDemuxContext
,
attachments
),
{
.
n
=
matroska_attachment
}
},
{
0
}
};
...
...
@@ -1270,7 +1270,7 @@ static void matroska_convert_tags(AVFormatContext *s)
for
(
i
=
0
;
i
<
matroska
->
tags
.
nb_elem
;
i
++
)
{
if
(
tags
[
i
].
target
.
attachuid
)
{
MatroskaAttach
e
ment
*
attachment
=
matroska
->
attachments
.
elem
;
MatroskaAttachment
*
attachment
=
matroska
->
attachments
.
elem
;
for
(
j
=
0
;
j
<
matroska
->
attachments
.
nb_elem
;
j
++
)
if
(
attachment
[
j
].
uid
==
tags
[
i
].
target
.
attachuid
&&
attachment
[
j
].
stream
)
...
...
@@ -1437,9 +1437,9 @@ static int matroska_aac_sri(int samplerate)
static
int
matroska_read_header
(
AVFormatContext
*
s
)
{
MatroskaDemuxContext
*
matroska
=
s
->
priv_data
;
EbmlList
*
attach
e
ments_list
=
&
matroska
->
attachments
;
EbmlList
*
chapters_list
=
&
matroska
->
chapters
;
MatroskaAttach
ement
*
attache
ments
;
EbmlList
*
attachments_list
=
&
matroska
->
attachments
;
EbmlList
*
chapters_list
=
&
matroska
->
chapters
;
MatroskaAttach
ment
*
attach
ments
;
MatroskaChapter
*
chapters
;
MatroskaTrack
*
tracks
;
uint64_t
max_start
=
0
;
...
...
@@ -1786,34 +1786,34 @@ static int matroska_read_header(AVFormatContext *s)
}
}
attach
ements
=
attache
ments_list
->
elem
;
for
(
j
=
0
;
j
<
attach
e
ments_list
->
nb_elem
;
j
++
)
{
if
(
!
(
attach
ements
[
j
].
filename
&&
attache
ments
[
j
].
mime
&&
attach
ements
[
j
].
bin
.
data
&&
attache
ments
[
j
].
bin
.
size
>
0
))
{
attach
ments
=
attach
ments_list
->
elem
;
for
(
j
=
0
;
j
<
attachments_list
->
nb_elem
;
j
++
)
{
if
(
!
(
attach
ments
[
j
].
filename
&&
attach
ments
[
j
].
mime
&&
attach
ments
[
j
].
bin
.
data
&&
attach
ments
[
j
].
bin
.
size
>
0
))
{
av_log
(
matroska
->
ctx
,
AV_LOG_ERROR
,
"incomplete attachment
\n
"
);
}
else
{
AVStream
*
st
=
avformat_new_stream
(
s
,
NULL
);
if
(
st
==
NULL
)
break
;
av_dict_set
(
&
st
->
metadata
,
"filename"
,
attach
e
ments
[
j
].
filename
,
0
);
av_dict_set
(
&
st
->
metadata
,
"mimetype"
,
attach
e
ments
[
j
].
mime
,
0
);
av_dict_set
(
&
st
->
metadata
,
"filename"
,
attachments
[
j
].
filename
,
0
);
av_dict_set
(
&
st
->
metadata
,
"mimetype"
,
attachments
[
j
].
mime
,
0
);
st
->
codec
->
codec_id
=
AV_CODEC_ID_NONE
;
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_ATTACHMENT
;
st
->
codec
->
extradata
=
av_malloc
(
attach
e
ments
[
j
].
bin
.
size
);
st
->
codec
->
extradata
=
av_malloc
(
attachments
[
j
].
bin
.
size
);
if
(
st
->
codec
->
extradata
==
NULL
)
break
;
st
->
codec
->
extradata_size
=
attach
e
ments
[
j
].
bin
.
size
;
memcpy
(
st
->
codec
->
extradata
,
attach
e
ments
[
j
].
bin
.
data
,
attach
e
ments
[
j
].
bin
.
size
);
st
->
codec
->
extradata_size
=
attachments
[
j
].
bin
.
size
;
memcpy
(
st
->
codec
->
extradata
,
attachments
[
j
].
bin
.
data
,
attachments
[
j
].
bin
.
size
);
for
(
i
=
0
;
ff_mkv_mime_tags
[
i
].
id
!=
AV_CODEC_ID_NONE
;
i
++
)
{
if
(
!
strncmp
(
ff_mkv_mime_tags
[
i
].
str
,
attach
e
ments
[
j
].
mime
,
if
(
!
strncmp
(
ff_mkv_mime_tags
[
i
].
str
,
attachments
[
j
].
mime
,
strlen
(
ff_mkv_mime_tags
[
i
].
str
)))
{
st
->
codec
->
codec_id
=
ff_mkv_mime_tags
[
i
].
id
;
break
;
}
}
attach
e
ments
[
j
].
stream
=
st
;
attachments
[
j
].
stream
=
st
;
}
}
...
...
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