Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
c4232d21
Commit
c4232d21
authored
Oct 11, 2006
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/input/input.c: fixed nasty bug with preparsing where a mutex was used uninitialized.
parent
baba0c81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/input/input.c
src/input/input.c
+5
-6
No files found.
src/input/input.c
View file @
c4232d21
...
...
@@ -715,6 +715,8 @@ static int Init( input_thread_t * p_input )
* want to add more logic, just force file by file:// or code it ;)
*/
memset
(
&
p_input
->
counters
,
0
,
sizeof
(
p_input
->
counters
)
);
vlc_mutex_init
(
p_input
,
&
p_input
->
counters
.
counters_lock
);
if
(
!
p_input
->
b_preparsing
)
{
/* Prepare statistics */
...
...
@@ -742,7 +744,6 @@ static int Init( input_thread_t * p_input )
if
(
p_input
->
counters
.
p_input_bitrate
)
p_input
->
counters
.
p_input_bitrate
->
update_interval
=
1000000
;
}
vlc_mutex_init
(
p_input
,
&
p_input
->
counters
.
counters_lock
);
/* handle sout */
psz
=
var_GetString
(
p_input
,
"sout"
);
...
...
@@ -1160,7 +1161,6 @@ static void End( input_thread_t * p_input )
p_input
->
p_libvlc
->
p_playlist
->
p_stats
);
p_input
->
p_libvlc
->
p_playlist
->
p_stats_computer
=
NULL
;
}
vlc_mutex_lock
(
&
p_input
->
counters
.
counters_lock
);
CL_CO
(
read_bytes
);
CL_CO
(
read_packets
);
CL_CO
(
demux_read
);
...
...
@@ -1173,7 +1173,6 @@ static void End( input_thread_t * p_input )
CL_CO
(
decoded_audio
)
;
CL_CO
(
decoded_video
);
CL_CO
(
decoded_sub
)
;
vlc_mutex_unlock
(
&
p_input
->
counters
.
counters_lock
);
}
/* Close optional stream output instance */
...
...
@@ -1181,11 +1180,9 @@ static void End( input_thread_t * p_input )
{
vlc_value_t
keep
;
vlc_mutex_lock
(
&
p_input
->
counters
.
counters_lock
);
CL_CO
(
sout_sent_packets
);
CL_CO
(
sout_sent_bytes
);
CL_CO
(
sout_send_bitrate
);
vlc_mutex_unlock
(
&
p_input
->
counters
.
counters_lock
);
if
(
var_Get
(
p_input
,
"sout-keep"
,
&
keep
)
>=
0
&&
keep
.
b_bool
)
{
...
...
@@ -1200,8 +1197,10 @@ static void End( input_thread_t * p_input )
sout_DeleteInstance
(
p_input
->
p_sout
);
}
}
#undef CL_CO
vlc_mutex_destroy
(
&
p_input
->
counters
.
counters_lock
);
/* Tell we're dead */
p_input
->
b_dead
=
VLC_TRUE
;
}
...
...
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