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
691503a2
Commit
691503a2
authored
Oct 30, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4|Bookmarks: fix memleaks.
parent
7989f86c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
modules/gui/qt4/dialogs/bookmarks.cpp
modules/gui/qt4/dialogs/bookmarks.cpp
+16
-4
No files found.
modules/gui/qt4/dialogs/bookmarks.cpp
View file @
691503a2
...
@@ -189,13 +189,15 @@ void BookmarksDialog::edit( QTreeWidgetItem *item, int column )
...
@@ -189,13 +189,15 @@ void BookmarksDialog::edit( QTreeWidgetItem *item, int column )
return
;
return
;
input_thread_t
*
p_input
=
THEMIM
->
getInput
();
input_thread_t
*
p_input
=
THEMIM
->
getInput
();
if
(
!
p_input
)
return
;
if
(
!
p_input
)
return
;
// We get the row number of the item
// We get the row number of the item
int
i_edit
=
bookmarksList
->
indexOfTopLevelItem
(
item
);
int
i_edit
=
bookmarksList
->
indexOfTopLevelItem
(
item
);
// We get the bookmarks list
// We get the bookmarks list
seekpoint_t
**
pp_bookmarks
;
seekpoint_t
**
pp_bookmarks
;
seekpoint_t
*
p_seekpoint
;
int
i_bookmarks
;
int
i_bookmarks
;
if
(
input_Control
(
p_input
,
INPUT_GET_BOOKMARKS
,
&
pp_bookmarks
,
if
(
input_Control
(
p_input
,
INPUT_GET_BOOKMARKS
,
&
pp_bookmarks
,
...
@@ -206,20 +208,30 @@ void BookmarksDialog::edit( QTreeWidgetItem *item, int column )
...
@@ -206,20 +208,30 @@ void BookmarksDialog::edit( QTreeWidgetItem *item, int column )
return
;
return
;
// We modify the seekpoint
// We modify the seekpoint
seekpoint_t
*
p_seekpoint
=
pp_bookmarks
[
i_edit
];
p_seekpoint
=
pp_bookmarks
[
i_edit
];
if
(
column
==
0
)
if
(
column
==
0
)
{
free
(
p_seekpoint
->
psz_name
);
p_seekpoint
->
psz_name
=
strdup
(
qtu
(
item
->
text
(
column
)
)
);
p_seekpoint
->
psz_name
=
strdup
(
qtu
(
item
->
text
(
column
)
)
);
}
else
if
(
column
==
1
)
else
if
(
column
==
1
)
p_seekpoint
->
i_byte_offset
=
atoi
(
qtu
(
item
->
text
(
column
)
)
);
p_seekpoint
->
i_byte_offset
=
atoi
(
qtu
(
item
->
text
(
column
)
)
);
else
if
(
column
==
2
)
else
if
(
column
==
2
)
p_seekpoint
->
i_time_offset
=
1000000
*
atoll
(
qtu
(
item
->
text
(
column
)
)
);
p_seekpoint
->
i_time_offset
=
1000000
*
atoll
(
qtu
(
item
->
text
(
column
)
)
);
// Send the modification
if
(
input_Control
(
p_input
,
INPUT_CHANGE_BOOKMARK
,
p_seekpoint
,
i_edit
)
!=
if
(
input_Control
(
p_input
,
INPUT_CHANGE_BOOKMARK
,
p_seekpoint
,
i_edit
)
!=
VLC_SUCCESS
)
VLC_SUCCESS
)
return
;
goto
clear
;
// Everything goes fine : update
update
();
update
();
// Clear the bookmark list
clear:
for
(
int
i
=
0
;
i
<
i_bookmarks
;
i
++
)
vlc_seekpoint_Delete
(
pp_bookmarks
[
i
]
);
free
(
pp_bookmarks
);
}
}
void
BookmarksDialog
::
extract
()
void
BookmarksDialog
::
extract
()
...
...
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