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
4990951b
Commit
4990951b
authored
Jul 08, 2006
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify, use LE_32, BE_32 macros
Originally committed as revision 5682 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f7e79298
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
mov.c
libavformat/mov.c
+2
-12
No files found.
libavformat/mov.c
View file @
4990951b
...
@@ -1571,16 +1571,6 @@ static void mov_free_stream_context(MOVStreamContext *sc)
...
@@ -1571,16 +1571,6 @@ static void mov_free_stream_context(MOVStreamContext *sc)
}
}
}
}
static
inline
uint32_t
mov_to_tag
(
uint8_t
*
buf
)
{
return
MKTAG
(
buf
[
0
],
buf
[
1
],
buf
[
2
],
buf
[
3
]);
}
static
inline
uint32_t
to_be32
(
uint8_t
*
buf
)
{
return
(
buf
[
0
]
<<
24
)
|
(
buf
[
1
]
<<
16
)
|
(
buf
[
2
]
<<
8
)
|
buf
[
3
];
}
/* XXX: is it sufficient ? */
/* XXX: is it sufficient ? */
static
int
mov_probe
(
AVProbeData
*
p
)
static
int
mov_probe
(
AVProbeData
*
p
)
{
{
...
@@ -1596,7 +1586,7 @@ static int mov_probe(AVProbeData *p)
...
@@ -1596,7 +1586,7 @@ static int mov_probe(AVProbeData *p)
/* ignore invalid offset */
/* ignore invalid offset */
if
((
offset
+
8
)
>
(
unsigned
int
)
p
->
buf_size
)
if
((
offset
+
8
)
>
(
unsigned
int
)
p
->
buf_size
)
return
score
;
return
score
;
tag
=
mov_to_tag
(
p
->
buf
+
offset
+
4
);
tag
=
LE_32
(
p
->
buf
+
offset
+
4
);
switch
(
tag
)
{
switch
(
tag
)
{
/* check for obvious tags */
/* check for obvious tags */
case
MKTAG
(
'j'
,
'P'
,
' '
,
' '
):
/* jpeg 2000 signature */
case
MKTAG
(
'j'
,
'P'
,
' '
,
' '
):
/* jpeg 2000 signature */
...
@@ -1614,7 +1604,7 @@ static int mov_probe(AVProbeData *p)
...
@@ -1614,7 +1604,7 @@ static int mov_probe(AVProbeData *p)
case
MKTAG
(
'f'
,
't'
,
'y'
,
'p'
):
case
MKTAG
(
'f'
,
't'
,
'y'
,
'p'
):
case
MKTAG
(
's'
,
'k'
,
'i'
,
'p'
):
case
MKTAG
(
's'
,
'k'
,
'i'
,
'p'
):
case
MKTAG
(
'u'
,
'u'
,
'i'
,
'd'
):
case
MKTAG
(
'u'
,
'u'
,
'i'
,
'd'
):
offset
=
to_be
32
(
p
->
buf
+
offset
)
+
offset
;
offset
=
BE_
32
(
p
->
buf
+
offset
)
+
offset
;
/* if we only find those cause probedata is too small at least rate them */
/* if we only find those cause probedata is too small at least rate them */
score
=
AVPROBE_SCORE_MAX
-
50
;
score
=
AVPROBE_SCORE_MAX
-
50
;
break
;
break
;
...
...
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