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
a254c574
Commit
a254c574
authored
Jul 19, 2005
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kill duplicated get/put_be24()
Originally committed as revision 4460 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
dd9f5916
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
33 deletions
+21
-33
avio.h
libavformat/avio.h
+2
-0
aviobuf.c
libavformat/aviobuf.c
+17
-8
flvdec.c
libavformat/flvdec.c
+0
-9
flvenc.c
libavformat/flvenc.c
+2
-7
mov.c
libavformat/mov.c
+0
-9
No files found.
libavformat/avio.h
View file @
a254c574
...
...
@@ -99,6 +99,7 @@ void put_le64(ByteIOContext *s, uint64_t val);
void
put_be64
(
ByteIOContext
*
s
,
uint64_t
val
);
void
put_le32
(
ByteIOContext
*
s
,
unsigned
int
val
);
void
put_be32
(
ByteIOContext
*
s
,
unsigned
int
val
);
void
put_be24
(
ByteIOContext
*
s
,
unsigned
int
val
);
void
put_le16
(
ByteIOContext
*
s
,
unsigned
int
val
);
void
put_be16
(
ByteIOContext
*
s
,
unsigned
int
val
);
void
put_tag
(
ByteIOContext
*
s
,
const
char
*
tag
);
...
...
@@ -134,6 +135,7 @@ unsigned int get_le16(ByteIOContext *s);
double
get_be64_double
(
ByteIOContext
*
s
);
char
*
get_strz
(
ByteIOContext
*
s
,
char
*
buf
,
int
maxlen
);
unsigned
int
get_be16
(
ByteIOContext
*
s
);
unsigned
int
get_be24
(
ByteIOContext
*
s
);
unsigned
int
get_be32
(
ByteIOContext
*
s
);
uint64_t
get_be64
(
ByteIOContext
*
s
);
...
...
libavformat/aviobuf.c
View file @
a254c574
...
...
@@ -253,6 +253,12 @@ void put_be16(ByteIOContext *s, unsigned int val)
put_byte
(
s
,
val
);
}
void
put_be24
(
ByteIOContext
*
s
,
unsigned
int
val
)
{
put_be16
(
s
,
val
>>
8
);
put_byte
(
s
,
val
);
}
void
put_tag
(
ByteIOContext
*
s
,
const
char
*
tag
)
{
while
(
*
tag
)
{
...
...
@@ -407,10 +413,8 @@ unsigned int get_le16(ByteIOContext *s)
unsigned
int
get_le32
(
ByteIOContext
*
s
)
{
unsigned
int
val
;
val
=
get_byte
(
s
);
val
|=
get_byte
(
s
)
<<
8
;
val
|=
get_byte
(
s
)
<<
16
;
val
|=
get_byte
(
s
)
<<
24
;
val
=
get_le16
(
s
);
val
|=
get_le16
(
s
)
<<
16
;
return
val
;
}
...
...
@@ -430,15 +434,20 @@ unsigned int get_be16(ByteIOContext *s)
return
val
;
}
unsigned
int
get_be
32
(
ByteIOContext
*
s
)
unsigned
int
get_be
24
(
ByteIOContext
*
s
)
{
unsigned
int
val
;
val
=
get_byte
(
s
)
<<
24
;
val
|=
get_byte
(
s
)
<<
16
;
val
|=
get_byte
(
s
)
<<
8
;
val
=
get_be16
(
s
)
<<
8
;
val
|=
get_byte
(
s
);
return
val
;
}
unsigned
int
get_be32
(
ByteIOContext
*
s
)
{
unsigned
int
val
;
val
=
get_be16
(
s
)
<<
16
;
val
|=
get_be16
(
s
);
return
val
;
}
double
get_be64_double
(
ByteIOContext
*
s
)
{
...
...
libavformat/flvdec.c
View file @
a254c574
...
...
@@ -18,15 +18,6 @@
*/
#include "avformat.h"
unsigned
int
get_be24
(
ByteIOContext
*
s
)
{
unsigned
int
val
;
val
=
get_byte
(
s
)
<<
16
;
val
|=
get_byte
(
s
)
<<
8
;
val
|=
get_byte
(
s
);
return
val
;
}
static
int
flv_probe
(
AVProbeData
*
p
)
{
const
uint8_t
*
d
;
...
...
libavformat/flvenc.c
View file @
a254c574
...
...
@@ -27,13 +27,6 @@ typedef struct FLVContext {
int
reserved
;
}
FLVContext
;
static
void
put_be24
(
ByteIOContext
*
pb
,
int
value
)
{
put_byte
(
pb
,
(
value
>>
16
)
&
0xFF
);
put_byte
(
pb
,
(
value
>>
8
)
&
0xFF
);
put_byte
(
pb
,
(
value
>>
0
)
&
0xFF
);
}
static
int
get_audio_flags
(
AVCodecContext
*
enc
){
int
flags
=
(
enc
->
bits_per_sample
==
16
)
?
0x2
:
0x0
;
...
...
@@ -52,6 +45,7 @@ static int get_audio_flags(AVCodecContext *enc){
flags
|=
0x00
;
break
;
default
:
av_log
(
enc
,
AV_LOG_ERROR
,
"flv doesnt support that sample rate, choose from (44100, 22050, 11025)
\n
"
);
return
-
1
;
}
...
...
@@ -75,6 +69,7 @@ static int get_audio_flags(AVCodecContext *enc){
flags
|=
enc
->
codec_tag
<<
4
;
break
;
default
:
av_log
(
enc
,
AV_LOG_ERROR
,
"codec not compatible with flv
\n
"
);
return
-
1
;
}
...
...
libavformat/mov.c
View file @
a254c574
...
...
@@ -550,15 +550,6 @@ static int mov_mp4_read_descr(ByteIOContext *pb, int *tag)
return
len
;
}
static
inline
unsigned
int
get_be24
(
ByteIOContext
*
s
)
{
unsigned
int
val
;
val
=
get_byte
(
s
)
<<
16
;
val
|=
get_byte
(
s
)
<<
8
;
val
|=
get_byte
(
s
);
return
val
;
}
static
int
mov_read_esds
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV_atom_t
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
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