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
246d92bc
Commit
246d92bc
authored
Sep 14, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: fix forward NULL
(cherry picked from commit dd6170364ffa7a6cc2248f2ef8b1f98e25f95589)
parent
60b89fc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
15 deletions
+21
-15
src/input/control.c
src/input/control.c
+21
-15
No files found.
src/input/control.c
View file @
246d92bc
...
@@ -530,28 +530,34 @@ static void UpdateBookmarksOption( input_thread_t *p_input )
...
@@ -530,28 +530,34 @@ static void UpdateBookmarksOption( input_thread_t *p_input )
}
}
char
*
psz_value
=
malloc
(
i_len
+
p_input
->
p
->
i_bookmark
+
1
);
char
*
psz_value
=
malloc
(
i_len
+
p_input
->
p
->
i_bookmark
+
1
);
char
*
psz_next
=
psz_value
;
psz_next
+=
sprintf
(
psz_next
,
"bookmarks="
);
if
(
psz_value
!=
NULL
)
for
(
int
i
=
0
;
i
<
p_input
->
p
->
i_bookmark
&&
psz_value
!=
NULL
;
i
++
)
{
{
const
seekpoint_t
*
p_bookmark
=
p_input
->
p
->
pp_bookmark
[
i
]
;
strcpy
(
psz_value
,
"bookmarks="
)
;
psz_next
+=
sprintf
(
psz_next
,
psz_format
,
char
*
psz_next
=
psz_value
+
strlen
(
"bookmarks"
);
p_bookmark
->
psz_name
,
p_bookmark
->
i_byte_offset
,
p_bookmark
->
i_time_offset
/
1000000
);
if
(
i
<
p_input
->
p
->
i_bookmark
-
1
)
for
(
int
i
=
0
;
i
<
p_input
->
p
->
i_bookmark
&&
psz_value
!=
NULL
;
i
++
)
*
psz_next
++
=
','
;
{
}
const
seekpoint_t
*
p_bookmark
=
p_input
->
p
->
pp_bookmark
[
i
];
vlc_mutex_unlock
(
&
p_input
->
p
->
p_item
->
lock
);
if
(
psz_value
)
psz_next
+=
sprintf
(
psz_next
,
psz_format
,
input_item_AddOption
(
p_input
->
p
->
p_item
,
psz_value
,
VLC_INPUT_OPTION_UNIQUE
);
p_bookmark
->
psz_name
,
p_bookmark
->
i_byte_offset
,
p_bookmark
->
i_time_offset
/
1000000
);
free
(
psz_value
);
if
(
i
<
p_input
->
p
->
i_bookmark
-
1
)
*
psz_next
++
=
','
;
}
}
vlc_mutex_unlock
(
&
p_input
->
p
->
p_item
->
lock
);
if
(
psz_value
!=
NULL
)
{
input_item_AddOption
(
p_input
->
p
->
p_item
,
psz_value
,
VLC_INPUT_OPTION_UNIQUE
);
free
(
psz_value
);
}
input_SendEventBookmark
(
p_input
);
input_SendEventBookmark
(
p_input
);
}
}
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