Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
4990951b
Commit
4990951b
authored
18 years ago
by
Baptiste Coudurier
Browse files
Options
Downloads
Patches
Plain Diff
simplify, use LE_32, BE_32 macros
Originally committed as revision 5682 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f7e79298
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/mov.c
+2
-12
2 additions, 12 deletions
libavformat/mov.c
with
2 additions
and
12 deletions
libavformat/mov.c
+
2
−
12
View file @
4990951b
...
...
@@ -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 ? */
static
int
mov_probe
(
AVProbeData
*
p
)
{
...
...
@@ -1596,7 +1586,7 @@ static int mov_probe(AVProbeData *p)
/* ignore invalid offset */
if
((
offset
+
8
)
>
(
unsigned
int
)
p
->
buf_size
)
return
score
;
tag
=
mov_to_tag
(
p
->
buf
+
offset
+
4
);
tag
=
LE_32
(
p
->
buf
+
offset
+
4
);
switch
(
tag
)
{
/* check for obvious tags */
case
MKTAG
(
'j'
,
'P'
,
' '
,
' '
):
/* jpeg 2000 signature */
...
...
@@ -1614,7 +1604,7 @@ static int mov_probe(AVProbeData *p)
case
MKTAG
(
'f'
,
't'
,
'y'
,
'p'
):
case
MKTAG
(
's'
,
'k'
,
'i'
,
'p'
):
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 */
score
=
AVPROBE_SCORE_MAX
-
50
;
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment