Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
28e638d8
Commit
28e638d8
authored
Jul 08, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fingerprinter: inline a cleanup handler
Cancellation is not possible there, so this was just a long jump.
parent
4b0ee0d6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
modules/misc/fingerprinter.c
modules/misc/fingerprinter.c
+7
-12
No files found.
modules/misc/fingerprinter.c
View file @
28e638d8
...
@@ -346,16 +346,6 @@ static void cancelRun( void * p_arg )
...
@@ -346,16 +346,6 @@ static void cancelRun( void * p_arg )
free
(
p_sys
->
psz_uri
);
free
(
p_sys
->
psz_uri
);
}
}
static
void
clearPrint
(
void
*
p_arg
)
{
acoustid_fingerprint_t
*
acoustid_print
=
(
acoustid_fingerprint_t
*
)
p_arg
;
for
(
unsigned
int
j
=
0
;
j
<
acoustid_print
->
results
.
count
;
j
++
)
free_acoustid_result_t
(
&
acoustid_print
->
results
.
p_results
[
j
]
);
if
(
acoustid_print
->
results
.
count
)
free
(
acoustid_print
->
results
.
p_results
);
free
(
acoustid_print
->
psz_fingerprint
);
}
static
void
Run
(
fingerprinter_thread_t
*
p_fingerprinter
)
static
void
Run
(
fingerprinter_thread_t
*
p_fingerprinter
)
{
{
fingerprinter_sys_t
*
p_sys
=
p_fingerprinter
->
p_sys
;
fingerprinter_sys_t
*
p_sys
=
p_fingerprinter
->
p_sys
;
...
@@ -379,7 +369,7 @@ static void Run( fingerprinter_thread_t *p_fingerprinter )
...
@@ -379,7 +369,7 @@ static void Run( fingerprinter_thread_t *p_fingerprinter )
fingerprint_request_t
*
p_data
=
vlc_array_item_at_index
(
p_sys
->
processing
.
queue
,
p_sys
->
i
);
fingerprint_request_t
*
p_data
=
vlc_array_item_at_index
(
p_sys
->
processing
.
queue
,
p_sys
->
i
);
acoustid_fingerprint_t
acoustid_print
;
acoustid_fingerprint_t
acoustid_print
;
memset
(
&
acoustid_print
,
0
,
sizeof
(
acoustid_fingerprint_t
)
);
memset
(
&
acoustid_print
,
0
,
sizeof
(
acoustid_fingerprint_t
)
);
vlc_cleanup_push
(
clearPrint
,
&
acoustid_print
);
// C2
p_sys
->
psz_uri
=
input_item_GetURI
(
p_data
->
p_item
);
p_sys
->
psz_uri
=
input_item_GetURI
(
p_data
->
p_item
);
if
(
p_sys
->
psz_uri
)
if
(
p_sys
->
psz_uri
)
{
{
...
@@ -394,9 +384,14 @@ static void Run( fingerprinter_thread_t *p_fingerprinter )
...
@@ -394,9 +384,14 @@ static void Run( fingerprinter_thread_t *p_fingerprinter )
fill_metas_with_results
(
p_data
,
&
acoustid_print
);
fill_metas_with_results
(
p_data
,
&
acoustid_print
);
FREENULL
(
p_sys
->
psz_uri
);
FREENULL
(
p_sys
->
psz_uri
);
for
(
unsigned
j
=
0
;
j
<
acoustid_print
.
results
.
count
;
j
++
)
free_acoustid_result_t
(
&
acoustid_print
.
results
.
p_results
[
j
]
);
if
(
acoustid_print
.
results
.
count
)
free
(
acoustid_print
.
results
.
p_results
);
free
(
acoustid_print
.
psz_fingerprint
);
vlc_restorecancel
(
canc
);
vlc_restorecancel
(
canc
);
}
}
vlc_cleanup_run
(
);
// C2
/* copy results */
/* copy results */
vlc_mutex_lock
(
&
p_sys
->
results
.
lock
);
vlc_mutex_lock
(
&
p_sys
->
results
.
lock
);
...
...
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