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
66d66513
Commit
66d66513
authored
Jul 26, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rar: small code factor
parent
be016630
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
modules/access/rar/rar.c
modules/access/rar/rar.c
+4
-10
No files found.
modules/access/rar/rar.c
View file @
66d66513
...
...
@@ -364,28 +364,22 @@ int RarParse(stream_t *s, int *count, rar_file_t ***file, unsigned int *pi_nbvol
has_next
=
1
;
if
(
vol
!=
s
)
stream_Delete
(
vol
);
free
(
volume_mrl
);
if
(
!
has_next
||
!
pattern
)
{
free
(
volume_mrl
);
if
(
!
has_next
||
!
pattern
)
return
VLC_SUCCESS
;
}
/* Open next volume */
const
int
volume_index
=
pattern
->
start
+
volume_offset
++
;
if
(
volume_index
>
pattern
->
stop
)
{
free
(
volume_mrl
);
if
(
volume_index
>
pattern
->
stop
)
return
VLC_SUCCESS
;
}
char
*
volume_base
;
if
(
asprintf
(
&
volume_base
,
"%s://%.*s"
,
s
->
psz_access
,
(
int
)(
strlen
(
s
->
psz_path
)
-
strlen
(
pattern
->
match
)),
s
->
psz_path
)
<
0
)
{
free
(
volume_mrl
);
(
int
)(
strlen
(
s
->
psz_path
)
-
strlen
(
pattern
->
match
)),
s
->
psz_path
)
<
0
)
return
VLC_SUCCESS
;
}
free
(
volume_mrl
);
if
(
pattern
->
start
)
{
if
(
asprintf
(
&
volume_mrl
,
pattern
->
format
,
volume_base
,
volume_index
)
<
0
)
volume_mrl
=
NULL
;
...
...
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