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
5968d2dd
Commit
5968d2dd
authored
Aug 05, 2008
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc spelling/grammar fixes
Originally committed as revision 14616 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
6888b4fc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
21 deletions
+21
-21
matroska.h
libavformat/matroska.h
+3
-3
matroskadec.c
libavformat/matroskadec.c
+17
-17
matroskaenc.c
libavformat/matroskaenc.c
+1
-1
No files found.
libavformat/matroska.h
View file @
5968d2dd
...
...
@@ -43,13 +43,13 @@
#define EBML_ID_VOID 0xEC
/*
* Matroska element IDs
. max. 32-bit.
* Matroska element IDs
, max. 32 bit
*/
/* toplevel segment */
#define MATROSKA_ID_SEGMENT 0x18538067
/*
m
atroska top-level master IDs */
/*
M
atroska top-level master IDs */
#define MATROSKA_ID_INFO 0x1549A966
#define MATROSKA_ID_TRACKS 0x1654AE6B
#define MATROSKA_ID_CUES 0x1C53BB6B
...
...
@@ -190,7 +190,7 @@ typedef enum {
}
MatroskaTrackEncodingCompAlgo
;
/*
* Matroska Codec IDs
. Strings.
* Matroska Codec IDs
, strings
*/
typedef
struct
CodecTags
{
...
...
libavformat/matroskadec.c
View file @
5968d2dd
/*
* Matroska file demuxer
* Copyright (c) 2003-2008 The
ff
mpeg Project
* Copyright (c) 2003-2008 The
FF
mpeg Project
*
* This file is part of FFmpeg.
*
...
...
@@ -25,7 +25,7 @@
* by Ronald Bultje <rbultje@ronald.bitfreak.net>
* with a little help from Moritz Bunkus <moritz@bunkus.org>
* totally reworked by Aurelien Jacobs <aurel@gnuage.org>
* Specs available on the
m
atroska project page: http://www.matroska.org/.
* Specs available on the
M
atroska project page: http://www.matroska.org/.
*/
#include "avformat.h"
...
...
@@ -176,7 +176,7 @@ typedef struct {
typedef
struct
{
AVFormatContext
*
ctx
;
/*
ebml
stuff */
/*
EBML
stuff */
int
num_levels
;
MatroskaLevel
levels
[
EBML_MAX_DEPTH
];
int
level_up
;
...
...
@@ -193,7 +193,7 @@ typedef struct {
/* byte position of the segment inside the stream */
offset_t
segment_start
;
/*
The packet queue.
*/
/*
the packet queue
*/
AVPacket
**
packets
;
int
num_packets
;
...
...
@@ -449,7 +449,7 @@ static EbmlSyntax matroska_clusters[] = {
};
/*
* Return:
whether we reached the end of a level in the hierarchy or not
* Return:
Whether we reached the end of a level in the hierarchy or not.
*/
static
int
ebml_level_end
(
MatroskaDemuxContext
*
matroska
)
{
...
...
@@ -472,7 +472,7 @@ static int ebml_level_end(MatroskaDemuxContext *matroska)
* number of 0-bits followed by a one. The position of the first
* "one" bit inside the first byte indicates the length of this
* number.
* Returns: num
. of bytes read. < 0 on error.
* Returns: num
ber of bytes read, < 0 on error
*/
static
int
ebml_read_num
(
MatroskaDemuxContext
*
matroska
,
ByteIOContext
*
pb
,
int
max_size
,
uint64_t
*
number
)
...
...
@@ -480,7 +480,7 @@ static int ebml_read_num(MatroskaDemuxContext *matroska, ByteIOContext *pb,
int
len_mask
=
0x80
,
read
=
1
,
n
=
1
;
int64_t
total
=
0
;
/*
t
he first byte tells us the length in bytes - get_byte() can normally
/*
T
he first byte tells us the length in bytes - get_byte() can normally
* return 0, but since that's not a valid first ebmlID byte, we can
* use it safely here to catch EOS. */
if
(
!
(
total
=
get_byte
(
pb
)))
{
...
...
@@ -528,7 +528,7 @@ static int ebml_read_uint(ByteIOContext *pb, int size, uint64_t *num)
if
(
size
<
1
||
size
>
8
)
return
AVERROR_INVALIDDATA
;
/* big-endian orde
n
ing; build up number */
/* big-endian orde
r
ing; build up number */
*
num
=
0
;
while
(
n
++
<
size
)
*
num
=
(
*
num
<<
8
)
|
get_byte
(
pb
);
...
...
@@ -559,7 +559,7 @@ static int ebml_read_float(ByteIOContext *pb, int size, double *num)
static
int
ebml_read_ascii
(
ByteIOContext
*
pb
,
int
size
,
char
**
str
)
{
av_free
(
*
str
);
/*
ebml
strings are usually not 0-terminated, so we allocate one
/*
EBML
strings are usually not 0-terminated, so we allocate one
* byte more, read the string and NULL-terminate it ourselves. */
if
(
!
(
*
str
=
av_malloc
(
size
+
1
)))
return
AVERROR
(
ENOMEM
);
...
...
@@ -615,7 +615,7 @@ static int ebml_read_master(MatroskaDemuxContext *matroska, int length)
/*
* Read signed/unsigned "EBML" numbers.
* Return: number of bytes processed, < 0 on error
.
* Return: number of bytes processed, < 0 on error
*/
static
int
matroska_ebmlnum_uint
(
MatroskaDemuxContext
*
matroska
,
uint8_t
*
data
,
uint32_t
size
,
uint64_t
*
num
)
...
...
@@ -769,7 +769,7 @@ static int matroska_probe(AVProbeData *p)
int
len_mask
=
0x80
,
size
=
1
,
n
=
1
;
char
probe_data
[]
=
"matroska"
;
/*
ebml
header? */
/*
EBML
header? */
if
(
AV_RB32
(
p
->
buf
)
!=
EBML_ID_HEADER
)
return
0
;
...
...
@@ -785,11 +785,11 @@ static int matroska_probe(AVProbeData *p)
while
(
n
<
size
)
total
=
(
total
<<
8
)
|
p
->
buf
[
4
+
n
++
];
/*
d
oes the probe data contain the whole header? */
/*
D
oes the probe data contain the whole header? */
if
(
p
->
buf_size
<
4
+
size
+
total
)
return
0
;
/*
t
he header must contain the document type 'matroska'. For now,
/*
T
he header must contain the document type 'matroska'. For now,
* we don't parse the whole header but simply check for the
* availability of that array of characters inside the header.
* Not fully fool-proof, but good enough. */
...
...
@@ -912,7 +912,7 @@ static void matroska_execute_seekhead(MatroskaDemuxContext *matroska)
if
(
url_fseek
(
matroska
->
ctx
->
pb
,
offset
,
SEEK_SET
)
!=
offset
)
continue
;
/*
w
e don't want to lose our seekhead level, so we add
/*
W
e don't want to lose our seekhead level, so we add
* a dummy. This is a crude hack. */
if
(
matroska
->
num_levels
==
EBML_MAX_DEPTH
)
{
av_log
(
matroska
->
ctx
,
AV_LOG_INFO
,
...
...
@@ -1375,7 +1375,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
lace_size
[
0
]
=
size
;
break
;
case
0x1
:
/*
x
iph lacing */
case
0x1
:
/*
X
iph lacing */
case
0x2
:
/* fixed-size lacing */
case
0x3
:
/* EBML lacing */
assert
(
size
>
0
);
// size <=3 is checked before size-=3 above
...
...
@@ -1385,7 +1385,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
lace_size
=
av_mallocz
(
laces
*
sizeof
(
int
));
switch
((
flags
&
0x06
)
>>
1
)
{
case
0x1
:
/*
x
iph lacing */
{
case
0x1
:
/*
X
iph lacing */
{
uint8_t
temp
;
uint32_t
total
=
0
;
for
(
n
=
0
;
res
==
0
&&
n
<
laces
-
1
;
n
++
)
{
...
...
@@ -1540,7 +1540,7 @@ static int matroska_parse_cluster(MatroskaDemuxContext *matroska)
MatroskaBlock
*
blocks
;
int
i
,
res
;
if
(
matroska
->
has_cluster_id
){
/* For the first cluster we parse, it
'
s ID was already read as
/* For the first cluster we parse, its ID was already read as
part of matroska_read_header(), so don't read it again */
res
=
ebml_parse_id
(
matroska
,
matroska_clusters
,
MATROSKA_ID_CLUSTER
,
&
cluster
);
...
...
libavformat/matroskaenc.c
View file @
5968d2dd
...
...
@@ -424,7 +424,7 @@ static int put_xiph_codecpriv(AVFormatContext *s, ByteIOContext *pb, AVCodecCont
static
int
put_flac_codecpriv
(
AVFormatContext
*
s
,
ByteIOContext
*
pb
,
AVCodecContext
*
codec
)
{
// if the extradata_size is greater than FLAC_STREAMINFO_SIZE,
// assume that it's in Matroska
's
format already
// assume that it's in Matroska format already
if
(
codec
->
extradata_size
<
FLAC_STREAMINFO_SIZE
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Invalid FLAC extradata
\n
"
);
return
-
1
;
...
...
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