Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gautam Chitnis
web-ui-redesign
Commits
d36fc485
Commit
d36fc485
authored
Mar 24, 2007
by
Laurent Aimar
Browse files
Fixed stat counter leaks on open failure.
parent
c3ec36df
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/input/input.c
View file @
d36fc485
...
...
@@ -1171,6 +1171,34 @@ error:
sout_DeleteInstance
(
p_input
->
p
->
p_sout
);
}
if
(
!
p_input
->
b_preparsing
&&
p_input
->
p_libvlc
->
b_stats
)
{
#define EXIT_COUNTER( c ) do { if( p_input->p->counters.p_##c ) \
stats_CounterClean( p_input->p->counters.p_##c );\
p_input->p->counters.p_##c = NULL; } while(0)
EXIT_COUNTER
(
read_bytes
);
EXIT_COUNTER
(
read_packets
);
EXIT_COUNTER
(
demux_read
);
EXIT_COUNTER
(
input_bitrate
);
EXIT_COUNTER
(
demux_bitrate
);
EXIT_COUNTER
(
played_abuffers
);
EXIT_COUNTER
(
lost_abuffers
);
EXIT_COUNTER
(
displayed_pictures
);
EXIT_COUNTER
(
lost_pictures
);
EXIT_COUNTER
(
decoded_audio
);
EXIT_COUNTER
(
decoded_video
);
EXIT_COUNTER
(
decoded_sub
);
if
(
p_input
->
p
->
p_sout
)
{
EXIT_COUNTER
(
sout_sent_packets
);
EXIT_COUNTER
(
sout_sent_bytes
);
EXIT_COUNTER
(
sout_send_bitrate
);
}
#undef EXIT_COUNTER
}
/* Mark them deleted */
p_input
->
p
->
input
.
p_demux
=
NULL
;
p_input
->
p
->
input
.
p_stream
=
NULL
;
...
...
Write
Preview
Supports
Markdown
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