Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
e44ad809
Commit
e44ad809
authored
Oct 15, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lirc: we don't need to keep the name of the file in memory.
parent
d5f3c2a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
modules/control/lirc.c
modules/control/lirc.c
+6
-6
No files found.
modules/control/lirc.c
View file @
e44ad809
...
...
@@ -70,7 +70,6 @@ vlc_module_end ()
*****************************************************************************/
struct
intf_sys_t
{
char
*
psz_file
;
struct
lirc_config
*
config
;
int
i_fd
;
...
...
@@ -90,6 +89,7 @@ static int Open( vlc_object_t *p_this )
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
intf_sys_t
*
p_sys
;
char
*
psz_file
;
/* Allocate instance and initialize some members */
p_intf
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
intf_sys_t
)
);
...
...
@@ -98,7 +98,6 @@ static int Open( vlc_object_t *p_this )
p_intf
->
pf_run
=
Run
;
p_sys
->
psz_file
=
var_CreateGetNonEmptyString
(
p_intf
,
"lirc-file"
);
p_sys
->
i_fd
=
lirc_init
(
"vlc"
,
1
);
if
(
p_sys
->
i_fd
==
-
1
)
{
...
...
@@ -109,19 +108,21 @@ static int Open( vlc_object_t *p_this )
/* We want polling */
fcntl
(
p_sys
->
i_fd
,
F_SETFL
,
fcntl
(
p_sys
->
i_fd
,
F_GETFL
)
|
O_NONBLOCK
);
/* */
if
(
lirc_readconfig
(
p_sys
->
psz_file
,
&
p_sys
->
config
,
NULL
)
!=
0
)
/* Read the configuration file */
psz_file
=
var_CreateGetNonEmptyString
(
p_intf
,
"lirc-file"
);
if
(
lirc_readconfig
(
psz_file
,
&
p_sys
->
config
,
NULL
)
!=
0
)
{
msg_Err
(
p_intf
,
"failure while reading lirc config"
);
free
(
psz_file
);
goto
exit
;
}
free
(
psz_file
);
return
VLC_SUCCESS
;
exit:
if
(
p_sys
->
i_fd
!=
-
1
)
lirc_deinit
();
free
(
p_sys
->
psz_file
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -137,7 +138,6 @@ static void Close( vlc_object_t *p_this )
/* Destroy structure */
lirc_freeconfig
(
p_sys
->
config
);
lirc_deinit
();
free
(
p_sys
->
psz_file
);
free
(
p_sys
);
}
...
...
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