Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
b93b012f
Commit
b93b012f
authored
Dec 03, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc1394: cleanings (no need to set p_sys to NULL and some other stuffs).
parent
58e40fc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
23 deletions
+7
-23
modules/access/dc1394.c
modules/access/dc1394.c
+7
-23
No files found.
modules/access/dc1394.c
View file @
b93b012f
...
...
@@ -65,12 +65,12 @@ static void Close( vlc_object_t * );
static
void
OpenAudioDev
(
demux_t
*
p_demux
);
static
inline
void
CloseAudioDev
(
demux_t
*
p_demux
);
vlc_module_begin
()
vlc_module_begin
()
set_description
(
N_
(
"dc1394 input"
)
)
set_capability
(
"access_demux"
,
10
)
add_shortcut
(
"dc1394"
)
set_callbacks
(
Open
,
Close
)
vlc_module_end
()
vlc_module_end
()
struct
demux_sys_t
{
...
...
@@ -104,9 +104,6 @@ struct demux_sys_t
int
i_audio_max_frame_size
;
int
fd_audio
;
char
*
audio_device
;
#define NO_ROTATION 0
#define ROTATION_LEFT 1
#define ROTATION_RIGHT 2
es_out_id_t
*
p_es_audio
;
};
...
...
@@ -237,7 +234,6 @@ static int Open( vlc_object_t *p_this )
"(MRL was: %s)"
,
p_demux
->
psz_path
);
free
(
p_sys
);
p_demux
->
p_sys
=
NULL
;
return
VLC_EGENERIC
;
}
...
...
@@ -245,8 +241,7 @@ static int Open( vlc_object_t *p_this )
if
(
!
p_sys
->
p_dccontext
)
{
msg_Err
(
p_demux
,
"Failed to initialise libdc1394"
);
free
(
p_demux
->
p_sys
);
p_demux
->
p_sys
=
NULL
;
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -254,7 +249,6 @@ static int Open( vlc_object_t *p_this )
{
dc1394_free
(
p_sys
->
p_dccontext
);
free
(
p_sys
);
p_demux
->
p_sys
=
NULL
;
return
VLC_EGENERIC
;
}
...
...
@@ -263,7 +257,6 @@ static int Open( vlc_object_t *p_this )
msg_Err
(
p_demux
,
"No camera found !!"
);
dc1394_free
(
p_sys
->
p_dccontext
);
free
(
p_sys
);
p_demux
->
p_sys
=
NULL
;
return
VLC_EGENERIC
;
}
...
...
@@ -493,14 +486,10 @@ static void OpenAudioDev( demux_t *p_demux )
static
inline
void
CloseAudioDev
(
demux_t
*
p_demux
)
{
demux_sys_t
*
p_sys
=
NULL
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
if
(
p_demux
)
{
p_sys
=
p_demux
->
p_sys
;
if
(
p_sys
->
fd_audio
>=
0
)
close
(
p_sys
->
fd_audio
);
}
if
(
p_sys
->
fd_audio
>=
0
)
close
(
p_sys
->
fd_audio
);
}
/*****************************************************************************
...
...
@@ -524,9 +513,7 @@ static void Close( vlc_object_t *p_this )
dc1394_camera_free
(
p_sys
->
camera
);
dc1394_free
(
p_sys
->
p_dccontext
);
if
(
p_sys
->
audio_device
)
free
(
p_sys
->
audio_device
);
free
(
p_sys
->
audio_device
);
free
(
p_sys
);
}
...
...
@@ -717,9 +704,6 @@ static int process_options( demux_t *p_demux )
const
char
*
in_fmt
=
NULL
;
float
rate_f
;
if
(
strncmp
(
p_demux
->
psz_access
,
"dc1394"
,
6
)
!=
0
)
return
VLC_EGENERIC
;
psz_dup
=
strdup
(
p_demux
->
psz_path
);
psz_parser
=
psz_dup
;
for
(
token
=
strtok_r
(
psz_parser
,
":"
,
&
state
);
token
;
...
...
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