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
856c0064
Commit
856c0064
authored
Apr 04, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder: do not update statistics if there is no input
parent
397701cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
src/input/decoder.c
src/input/decoder.c
+15
-7
No files found.
src/input/decoder.c
View file @
856c0064
...
@@ -1249,7 +1249,6 @@ static void DecoderPlayAudio( decoder_t *p_dec, aout_buffer_t *p_audio,
...
@@ -1249,7 +1249,6 @@ static void DecoderPlayAudio( decoder_t *p_dec, aout_buffer_t *p_audio,
static
void
DecoderDecodeAudio
(
decoder_t
*
p_dec
,
block_t
*
p_block
)
static
void
DecoderDecodeAudio
(
decoder_t
*
p_dec
,
block_t
*
p_block
)
{
{
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
input_thread_t
*
p_input
=
p_owner
->
p_input
;
aout_buffer_t
*
p_aout_buf
;
aout_buffer_t
*
p_aout_buf
;
int
i_decoded
=
0
;
int
i_decoded
=
0
;
int
i_lost
=
0
;
int
i_lost
=
0
;
...
@@ -1290,7 +1289,9 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
...
@@ -1290,7 +1289,9 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
}
}
/* Update ugly stat */
/* Update ugly stat */
if
(
i_decoded
>
0
||
i_lost
>
0
||
i_played
>
0
)
input_thread_t
*
p_input
=
p_owner
->
p_input
;
if
(
p_input
!=
NULL
&&
(
i_decoded
>
0
||
i_lost
>
0
||
i_played
>
0
)
)
{
{
vlc_mutex_lock
(
&
p_input
->
p
->
counters
.
counters_lock
);
vlc_mutex_lock
(
&
p_input
->
p
->
counters
.
counters_lock
);
...
@@ -1475,7 +1476,6 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
...
@@ -1475,7 +1476,6 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
static
void
DecoderDecodeVideo
(
decoder_t
*
p_dec
,
block_t
*
p_block
)
static
void
DecoderDecodeVideo
(
decoder_t
*
p_dec
,
block_t
*
p_block
)
{
{
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
input_thread_t
*
p_input
=
p_owner
->
p_input
;
picture_t
*
p_pic
;
picture_t
*
p_pic
;
int
i_lost
=
0
;
int
i_lost
=
0
;
int
i_decoded
=
0
;
int
i_decoded
=
0
;
...
@@ -1516,7 +1516,11 @@ static void DecoderDecodeVideo( decoder_t *p_dec, block_t *p_block )
...
@@ -1516,7 +1516,11 @@ static void DecoderDecodeVideo( decoder_t *p_dec, block_t *p_block )
DecoderPlayVideo
(
p_dec
,
p_pic
,
&
i_displayed
,
&
i_lost
);
DecoderPlayVideo
(
p_dec
,
p_pic
,
&
i_displayed
,
&
i_lost
);
}
}
if
(
i_decoded
>
0
||
i_lost
>
0
||
i_displayed
>
0
)
/* Update ugly stat */
input_thread_t
*
p_input
=
p_owner
->
p_input
;
if
(
p_input
!=
NULL
&&
(
i_decoded
>
0
||
i_lost
>
0
||
i_displayed
>
0
)
)
{
{
vlc_mutex_lock
(
&
p_input
->
p
->
counters
.
counters_lock
);
vlc_mutex_lock
(
&
p_input
->
p
->
counters
.
counters_lock
);
...
@@ -1916,10 +1920,14 @@ static void DecoderProcessSpu( decoder_t *p_dec, block_t *p_block, bool b_flush
...
@@ -1916,10 +1920,14 @@ static void DecoderProcessSpu( decoder_t *p_dec, block_t *p_block, bool b_flush
subpicture_t
*
p_spu
;
subpicture_t
*
p_spu
;
while
(
(
p_spu
=
p_dec
->
pf_decode_sub
(
p_dec
,
p_block
?
&
p_block
:
NULL
)
)
)
while
(
(
p_spu
=
p_dec
->
pf_decode_sub
(
p_dec
,
p_block
?
&
p_block
:
NULL
)
)
)
{
if
(
p_input
!=
NULL
)
{
{
vlc_mutex_lock
(
&
p_input
->
p
->
counters
.
counters_lock
);
vlc_mutex_lock
(
&
p_input
->
p
->
counters
.
counters_lock
);
stats_UpdateInteger
(
p_dec
,
p_input
->
p
->
counters
.
p_decoded_sub
,
1
,
NULL
);
stats_UpdateInteger
(
p_dec
,
p_input
->
p
->
counters
.
p_decoded_sub
,
1
,
NULL
);
vlc_mutex_unlock
(
&
p_input
->
p
->
counters
.
counters_lock
);
vlc_mutex_unlock
(
&
p_input
->
p
->
counters
.
counters_lock
);
}
p_vout
=
input_resource_HoldVout
(
p_owner
->
p_resource
);
p_vout
=
input_resource_HoldVout
(
p_owner
->
p_resource
);
if
(
p_vout
&&
p_owner
->
p_spu_vout
==
p_vout
)
if
(
p_vout
&&
p_owner
->
p_spu_vout
==
p_vout
)
...
...
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