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
27edb261
Commit
27edb261
authored
May 20, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memleak (same problem with var_Change(VLC_VAR_FREELIST)).
parent
25070505
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/control/audio.c
src/control/audio.c
+7
-7
No files found.
src/control/audio.c
View file @
27edb261
...
...
@@ -441,13 +441,13 @@ int libvlc_audio_get_track( libvlc_media_player_t *p_mi,
var_Change
(
p_input_thread
,
"audio-es"
,
VLC_VAR_GETCHOICES
,
&
val_list
,
NULL
);
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
vlc_value_t
track_val
=
val_list
.
p_list
->
p_values
[
i
];
if
(
track_val
.
i_int
==
val
.
i_int
)
if
(
val_list
.
p_list
->
p_values
[
i
].
i_int
==
val
.
i_int
)
{
i_track
=
i
;
break
;
}
}
}
var_Change
(
p_input_thread
,
"audio-es"
,
VLC_VAR_FREELIST
,
&
val_list
,
NULL
);
vlc_object_release
(
p_input_thread
);
return
i_track
;
}
...
...
@@ -470,16 +470,16 @@ void libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track,
if
(
(
i_track
<
0
)
&&
(
i_track
>
val_list
.
p_list
->
i_count
)
)
{
libvlc_exception_raise
(
p_e
,
"Audio track out of range"
);
vlc_object_release
(
p_input_thread
);
return
;
goto
end
;
}
newval
=
val_list
.
p_list
->
p_values
[
i_track
];
i_ret
=
var_Set
(
p_input_thread
,
"audio-es"
,
newval
);
if
(
i_ret
<
0
)
{
libvlc_exception_raise
(
p_e
,
"Setting audio track failed"
);
}
end:
var_Change
(
p_input_thread
,
"audio-es"
,
VLC_VAR_FREELIST
,
&
val_list
,
NULL
);
vlc_object_release
(
p_input_thread
);
}
...
...
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