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
b1a3bd05
Commit
b1a3bd05
authored
Oct 31, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress some useless variable
parent
dde789cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
modules/access/file.c
modules/access/file.c
+7
-9
No files found.
modules/access/file.c
View file @
b1a3bd05
...
@@ -129,10 +129,8 @@ struct access_sys_t
...
@@ -129,10 +129,8 @@ struct access_sys_t
int
i_index
;
int
i_index
;
#ifndef UNDER_CE
#ifndef UNDER_CE
int
fd
;
int
fd
;
int
fd_backup
;
#else
#else
FILE
*
fd
;
FILE
*
fd
;
FILE
*
fd_backup
;
#endif
#endif
/* */
/* */
...
@@ -253,7 +251,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -253,7 +251,7 @@ static int Open( vlc_object_t *p_this )
if
(
p_sys
->
b_seekable
&&
!
p_access
->
info
.
i_size
)
if
(
p_sys
->
b_seekable
&&
!
p_access
->
info
.
i_size
)
{
{
/* FIXME that's bad because all others access will be probed */
/* FIXME that's bad because all others access will be probed */
msg_Err
(
p_access
,
"file %s is empty, aborting"
,
p
sz_name
);
msg_Err
(
p_access
,
"file %s is empty, aborting"
,
p
_access
->
psz_path
);
close
(
p_sys
->
fd
);
close
(
p_sys
->
fd
);
free
(
p_sys
);
free
(
p_sys
);
free
(
psz_name
);
free
(
psz_name
);
...
@@ -434,17 +432,17 @@ static int Read( access_t *p_access, uint8_t *p_buffer, int i_len )
...
@@ -434,17 +432,17 @@ static int Read( access_t *p_access, uint8_t *p_buffer, int i_len )
if
(
i_ret
==
0
&&
p_sys
->
i_index
+
1
<
p_sys
->
i_file
)
if
(
i_ret
==
0
&&
p_sys
->
i_index
+
1
<
p_sys
->
i_file
)
{
{
char
*
psz_name
=
p_sys
->
file
[
++
p_sys
->
i_index
]
->
psz_name
;
char
*
psz_name
=
p_sys
->
file
[
++
p_sys
->
i_index
]
->
psz_name
;
p_sys
->
fd_backup
=
p_sys
->
fd
;
int
fd_backup
=
p_sys
->
fd
;
msg_Dbg
(
p_access
,
"opening file `%s'"
,
psz_name
);
msg_Dbg
(
p_access
,
"opening file `%s'"
,
psz_name
);
if
(
_OpenFile
(
p_access
,
psz_name
)
)
if
(
_OpenFile
(
p_access
,
psz_name
)
)
{
{
p_sys
->
fd
=
p_sys
->
fd_backup
;
p_sys
->
fd
=
fd_backup
;
return
0
;
return
0
;
}
}
close
(
p_sys
->
fd_backup
);
close
(
fd_backup
);
/* We have to read some data */
/* We have to read some data */
return
Read
(
p_access
,
p_buffer
,
i_len
);
return
Read
(
p_access
,
p_buffer
,
i_len
);
...
@@ -471,7 +469,7 @@ static int Seek( access_t *p_access, int64_t i_pos )
...
@@ -471,7 +469,7 @@ static int Seek( access_t *p_access, int64_t i_pos )
{
{
int
i
;
int
i
;
char
*
psz_name
;
char
*
psz_name
;
p_sys
->
fd_backup
=
p_sys
->
fd
;
int
fd_backup
=
p_sys
->
fd
;
for
(
i
=
0
;
i
<
p_sys
->
i_file
-
1
;
i
++
)
for
(
i
=
0
;
i
<
p_sys
->
i_file
-
1
;
i
++
)
{
{
...
@@ -486,12 +484,12 @@ static int Seek( access_t *p_access, int64_t i_pos )
...
@@ -486,12 +484,12 @@ static int Seek( access_t *p_access, int64_t i_pos )
if
(
i
!=
p_sys
->
i_index
&&
!
_OpenFile
(
p_access
,
psz_name
)
)
if
(
i
!=
p_sys
->
i_index
&&
!
_OpenFile
(
p_access
,
psz_name
)
)
{
{
/* Close old file */
/* Close old file */
close
(
p_sys
->
fd_backup
);
close
(
fd_backup
);
p_sys
->
i_index
=
i
;
p_sys
->
i_index
=
i
;
}
}
else
else
{
{
p_sys
->
fd
=
p_sys
->
fd_backup
;
p_sys
->
fd
=
fd_backup
;
}
}
}
}
...
...
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