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
39434a18
Commit
39434a18
authored
17 years ago
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return pointer to osdmenu object and use that iso NULL pointer.
parent
b993600a
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
src/osd/osd.c
src/osd/osd.c
+12
-15
No files found.
src/osd/osd.c
View file @
39434a18
...
@@ -28,9 +28,10 @@
...
@@ -28,9 +28,10 @@
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc_keys.h>
#include <vlc_keys.h>
#include <vlc_osd.h>
#include <vlc_osd.h>
#include "libvlc.h"
#include <vlc_image.h>
#include <vlc_image.h>
#include "libvlc.h"
#undef OSD_MENU_DEBUG
#undef OSD_MENU_DEBUG
/*****************************************************************************
/*****************************************************************************
...
@@ -55,18 +56,15 @@ static vlc_bool_t osd_isVisible( osd_menu_t *p_osd )
...
@@ -55,18 +56,15 @@ static vlc_bool_t osd_isVisible( osd_menu_t *p_osd )
/*****************************************************************************
/*****************************************************************************
* Wrappers for loading and unloading osd parser modules.
* Wrappers for loading and unloading osd parser modules.
*****************************************************************************/
*****************************************************************************/
static
int
osd_ParserLoad
(
vlc_object_t
*
p_this
,
const
char
*
psz_file
,
static
osd_menu_t
*
osd_ParserLoad
(
vlc_object_t
*
p_this
,
const
char
*
psz_file
)
osd_menu_t
**
pp_menu
)
{
{
osd_menu_t
*
p_menu
=
*
pp_menu
;
osd_menu_t
*
p_menu
;
if
(
pp_menu
&&
p_menu
)
return
VLC_EGENERIC
;
p_menu
=
vlc_object_create
(
p_this
,
VLC_OBJECT_OSDMENU
);
p_menu
=
vlc_object_create
(
p_this
,
VLC_OBJECT_OSDMENU
);
if
(
!
p_menu
)
if
(
!
p_menu
)
{
{
msg_Err
(
p_this
,
"out of memory"
);
msg_Err
(
p_this
,
"out of memory"
);
return
VLC_ENOMEM
;
return
NULL
;
}
}
vlc_object_attach
(
p_this
,
p_menu
);
vlc_object_attach
(
p_this
,
p_menu
);
...
@@ -76,8 +74,8 @@ static int osd_ParserLoad( vlc_object_t *p_this, const char *psz_file,
...
@@ -76,8 +74,8 @@ static int osd_ParserLoad( vlc_object_t *p_this, const char *psz_file,
if
(
!
p_menu
->
p_image
||
!
p_menu
->
psz_file
)
if
(
!
p_menu
->
p_image
||
!
p_menu
->
psz_file
)
{
{
msg_Err
(
p_this
,
"unable to load images, aborting .."
);
msg_Err
(
p_this
,
"unable to load images, aborting .."
);
osd_ParserUnload
(
p_this
,
p
p
_menu
);
osd_ParserUnload
(
p_this
,
p_menu
);
return
VLC_ENOMEM
;
return
NULL
;
}
}
else
else
{
{
...
@@ -94,16 +92,14 @@ static int osd_ParserLoad( vlc_object_t *p_this, const char *psz_file,
...
@@ -94,16 +92,14 @@ static int osd_ParserLoad( vlc_object_t *p_this, const char *psz_file,
if
(
!
p_menu
->
p_parser
)
if
(
!
p_menu
->
p_parser
)
{
{
osd_ParserUnload
(
p_this
,
pp_menu
);
osd_ParserUnload
(
p_this
,
pp_menu
);
return
VLC_ENOOBJ
;
return
NULL
;
}
}
}
}
return
VLC_SUCCESS
;
return
p_menu
;
}
}
static
void
osd_ParserUnload
(
vlc_object_t
*
p_this
,
osd_menu_t
*
*
p
p_menu
)
static
void
osd_ParserUnload
(
vlc_object_t
*
p_this
,
osd_menu_t
*
p_menu
)
{
{
osd_menu_t
*
p_menu
=
(
osd_menu_t
*
)
*
pp_menu
;
if
(
p_menu
->
p_parser
)
if
(
p_menu
->
p_parser
)
{
{
module_Unneed
(
p_menu
,
p_menu
->
p_parser
);
module_Unneed
(
p_menu
,
p_menu
->
p_parser
);
...
@@ -141,7 +137,8 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
...
@@ -141,7 +137,8 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
vlc_value_t
val
;
vlc_value_t
val
;
/* Parse configuration file */
/* Parse configuration file */
if
(
osd_ParserLoad
(
p_this
,
psz_file
,
&
p_osd
)
)
p_osd
=
osd_ParserLoad
(
p_this
,
psz_file
);
if
(
!
p_osd
)
goto
error
;
goto
error
;
/* Setup default button (first button) */
/* Setup default button (first button) */
...
...
This diff is collapsed.
Click to expand it.
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