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
6166f14e
Commit
6166f14e
authored
Dec 15, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control/media_control: fix a memleak (we don't need to do a copy if we use const char*).
parent
b516e441
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
src/control/mediacontrol_audio_video.c
src/control/mediacontrol_audio_video.c
+8
-10
No files found.
src/control/mediacontrol_audio_video.c
View file @
6166f14e
...
...
@@ -123,7 +123,7 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
static
int
mediacontrol_showtext
(
vout_thread_t
*
p_vout
,
int
i_channel
,
char
*
psz_string
,
text_style_t
*
p_style
,
c
onst
c
har
*
psz_string
,
text_style_t
*
p_style
,
int
i_flags
,
int
i_hmargin
,
int
i_vmargin
,
mtime_t
i_start
,
mtime_t
i_stop
)
{
...
...
@@ -142,13 +142,17 @@ mediacontrol_display_text( mediacontrol_Instance *self,
mediacontrol_Exception
*
exception
)
{
vout_thread_t
*
p_vout
=
NULL
;
char
*
psz_message
;
input_thread_t
*
p_input
;
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
mediacontrol_exception_init
(
exception
);
if
(
!
message
)
{
RAISE_VOID
(
mediacontrol_InternalException
,
"Empty text"
);
}
p_input
=
libvlc_get_input_thread
(
self
->
p_media_player
,
&
ex
);
if
(
!
p_input
)
{
...
...
@@ -160,12 +164,6 @@ mediacontrol_display_text( mediacontrol_Instance *self,
RAISE_VOID
(
mediacontrol_InternalException
,
"No video output"
);
}
psz_message
=
strdup
(
message
);
if
(
!
psz_message
)
{
RAISE_VOID
(
mediacontrol_InternalException
,
"no more memory"
);
}
if
(
begin
->
origin
==
mediacontrol_RelativePosition
&&
begin
->
value
==
0
&&
end
->
origin
==
mediacontrol_RelativePosition
)
...
...
@@ -179,7 +177,7 @@ mediacontrol_display_text( mediacontrol_Instance *self,
mediacontrol_MediaTime
,
end
->
value
);
mediacontrol_showtext
(
p_vout
,
DEFAULT_CHAN
,
psz_
message
,
NULL
,
mediacontrol_showtext
(
p_vout
,
DEFAULT_CHAN
,
message
,
NULL
,
OSD_ALIGN_BOTTOM
|
OSD_ALIGN_LEFT
,
0
,
0
,
i_now
,
i_now
+
i_duration
);
}
...
...
@@ -199,7 +197,7 @@ mediacontrol_display_text( mediacontrol_Instance *self,
(
mediacontrol_Position
*
)
end
);
i_fin
+=
i_now
;
vout_ShowTextAbsolute
(
p_vout
,
DEFAULT_CHAN
,
psz_
message
,
NULL
,
vout_ShowTextAbsolute
(
p_vout
,
DEFAULT_CHAN
,
message
,
NULL
,
OSD_ALIGN_BOTTOM
|
OSD_ALIGN_LEFT
,
0
,
0
,
i_debut
,
i_fin
);
}
...
...
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