Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
3926a30b
Commit
3926a30b
authored
Apr 21, 2014
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/ffhash: use av_hash_final_hex().
parent
b804eb43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
ffhash.c
tools/ffhash.c
+3
-12
No files found.
tools/ffhash.c
View file @
3926a30b
...
...
@@ -40,7 +40,6 @@
#define SIZE 65536
static
struct
AVHashContext
*
hash
;
static
uint8_t
*
res
;
static
void
usage
(
void
)
{
...
...
@@ -60,12 +59,10 @@ static void usage(void)
static
void
finish
(
void
)
{
int
i
,
len
=
av_hash_get_size
(
hash
)
;
char
res
[
2
*
AV_HASH_MAX_SIZE
+
1
]
;
printf
(
"%s=0x"
,
av_hash_get_name
(
hash
));
av_hash_final
(
hash
,
res
);
for
(
i
=
0
;
i
<
len
;
i
++
)
printf
(
"%02x"
,
res
[
i
]);
av_hash_final_hex
(
hash
,
res
,
sizeof
(
res
));
printf
(
"%s=0x%s"
,
av_hash_get_name
(
hash
),
res
);
}
static
int
check
(
char
*
file
)
...
...
@@ -130,11 +127,6 @@ int main(int argc, char **argv)
}
return
1
;
}
res
=
av_malloc
(
av_hash_get_size
(
hash
));
if
(
!
res
)
{
printf
(
"%s
\n
"
,
strerror
(
errno
));
return
1
;
}
for
(
i
=
2
;
i
<
argc
;
i
++
)
ret
|=
check
(
argv
[
i
]);
...
...
@@ -143,7 +135,6 @@ int main(int argc, char **argv)
ret
|=
check
(
NULL
);
av_hash_freep
(
&
hash
);
av_freep
(
&
res
);
return
ret
;
}
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