Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
97d95892
Commit
97d95892
authored
Mar 08, 2002
by
Johan Bilien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* added some tests in open
parent
32981e8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
12 deletions
+35
-12
plugins/vcd/input_vcd.c
plugins/vcd/input_vcd.c
+35
-12
No files found.
plugins/vcd/input_vcd.c
View file @
97d95892
...
...
@@ -121,22 +121,14 @@ static int VCDOpen( struct input_thread_s *p_input )
char
*
psz_parser
;
char
*
psz_source
;
char
*
psz_next
;
struct
stat
stat_info
;
thread_vcd_data_t
*
p_vcd
;
int
i
;
input_area_t
*
p_area
;
int
i_title
=
1
;
int
i_chapter
=
1
;
p_vcd
=
malloc
(
sizeof
(
thread_vcd_data_t
)
);
if
(
p_vcd
==
NULL
)
{
intf_ErrMsg
(
"vcd error: out of memory"
);
return
-
1
;
}
p_input
->
i_mtu
=
VCD_DATA_ONCE
;
p_input
->
p_access_data
=
(
void
*
)
p_vcd
;
/* parse the options passed in command line : */
psz_orig
=
psz_parser
=
psz_source
=
strdup
(
p_input
->
psz_name
);
...
...
@@ -177,10 +169,38 @@ static int VCDOpen( struct input_thread_s *p_input )
}
psz_source
=
config_GetPszVariable
(
INPUT_VCD_DEVICE_VAR
);
}
/* test the type of file given */
if
(
stat
(
psz_source
,
&
stat_info
)
==
-
1
)
{
intf_ErrMsg
(
"input: vcd: cannot stat() source `%s' (%s)"
,
psz_source
,
strerror
(
errno
));
return
(
-
1
);
}
if
(
!
S_ISBLK
(
stat_info
.
st_mode
)
)
{
intf_WarnMsg
(
3
,
"input : VCD plugin discarded"
" (not a valid drive)"
);
return
-
1
;
}
p_vcd
=
malloc
(
sizeof
(
thread_vcd_data_t
)
);
if
(
p_vcd
==
NULL
)
{
intf_ErrMsg
(
"vcd error: out of memory"
);
return
-
1
;
}
p_input
->
p_access_data
=
(
void
*
)
p_vcd
;
p_input
->
i_mtu
=
VCD_DATA_ONCE
;
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
/* If we are here we can control the pace... */
p_input
->
stream
.
b_pace_control
=
1
;
p_input
->
stream
.
b_seekable
=
1
;
...
...
@@ -204,12 +224,14 @@ static int VCDOpen( struct input_thread_s *p_input )
if
(
p_vcd
->
nb_tracks
<
0
)
{
intf_ErrMsg
(
"input: vcd: was unable to count tracks"
);
close
(
p_vcd
->
i_handle
);
free
(
p_vcd
);
return
-
1
;
}
else
if
(
p_vcd
->
nb_tracks
<=
1
)
{
intf_ErrMsg
(
"input: vcd: no movie tracks found"
);
close
(
p_vcd
->
i_handle
);
free
(
p_vcd
);
return
-
1
;
}
...
...
@@ -218,6 +240,7 @@ static int VCDOpen( struct input_thread_s *p_input )
psz_source
);
if
(
p_vcd
->
p_sectors
==
NULL
)
{
close
(
p_vcd
->
i_handle
);
free
(
p_vcd
);
return
-
1
;
}
...
...
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