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
5d1d43dc
Commit
5d1d43dc
authored
Nov 04, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed useless timestamp discontinuity with sout.
parent
352ed528
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
7 deletions
+75
-7
src/input/decoder.c
src/input/decoder.c
+75
-7
No files found.
src/input/decoder.c
View file @
5d1d43dc
...
...
@@ -137,6 +137,9 @@ struct decoder_owner_sys_t
aout_buffer_t
*
p_audio
;
aout_buffer_t
**
pp_audio_next
;
block_t
*
p_block
;
block_t
**
pp_block_next
;
}
buffer
;
/* Flushing */
...
...
@@ -513,7 +516,8 @@ void input_DecoderStartBuffering( decoder_t *p_dec )
p_owner
->
buffer
.
b_full
=
false
;
p_owner
->
buffer
.
i_count
=
0
;
assert
(
!
p_owner
->
buffer
.
p_picture
&&
!
p_owner
->
buffer
.
p_subpic
&&
!
p_owner
->
buffer
.
p_audio
);
assert
(
!
p_owner
->
buffer
.
p_picture
&&
!
p_owner
->
buffer
.
p_subpic
&&
!
p_owner
->
buffer
.
p_audio
&&
!
p_owner
->
buffer
.
p_block
);
p_owner
->
buffer
.
p_picture
=
NULL
;
p_owner
->
buffer
.
pp_picture_next
=
&
p_owner
->
buffer
.
p_picture
;
...
...
@@ -524,6 +528,10 @@ void input_DecoderStartBuffering( decoder_t *p_dec )
p_owner
->
buffer
.
p_audio
=
NULL
;
p_owner
->
buffer
.
pp_audio_next
=
&
p_owner
->
buffer
.
p_audio
;
p_owner
->
buffer
.
p_block
=
NULL
;
p_owner
->
buffer
.
pp_block_next
=
&
p_owner
->
buffer
.
p_block
;
p_owner
->
b_buffering
=
true
;
vlc_cond_signal
(
&
p_owner
->
wait
);
...
...
@@ -771,6 +779,7 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
p_owner
->
buffer
.
p_picture
=
NULL
;
p_owner
->
buffer
.
p_subpic
=
NULL
;
p_owner
->
buffer
.
p_audio
=
NULL
;
p_owner
->
buffer
.
p_block
=
NULL
;
p_owner
->
b_flushing
=
false
;
...
...
@@ -1526,15 +1535,66 @@ static void DecoderPlaySout( decoder_t *p_dec, block_t *p_sout_block,
vlc_mutex_lock
(
&
p_owner
->
lock
);
if
(
p_owner
->
b_buffering
||
p_owner
->
buffer
.
p_block
)
{
p_sout_block
->
p_next
=
NULL
;
block_ChainLastAppend
(
&
p_owner
->
buffer
.
pp_block_next
,
p_sout_block
);
p_owner
->
buffer
.
i_count
++
;
/* XXX it is important to be full after the first one */
if
(
p_owner
->
buffer
.
i_count
>
0
)
{
p_owner
->
buffer
.
b_full
=
true
;
vlc_cond_signal
(
&
p_owner
->
wait
);
}
}
for
(
;;
)
{
bool
b_has_more
=
false
;
bool
b_reject
;
DecoderWaitUnblock
(
p_dec
,
&
b_reject
);
DecoderFixTs
(
p_dec
,
&
p_sout_block
->
i_dts
,
&
p_sout_block
->
i_pts
,
&
p_sout_block
->
i_length
,
if
(
p_owner
->
b_buffering
)
{
vlc_mutex_unlock
(
&
p_owner
->
lock
);
return
;
}
/* */
if
(
p_owner
->
buffer
.
p_block
)
{
p_sout_block
=
p_owner
->
buffer
.
p_block
;
p_owner
->
buffer
.
p_block
=
p_sout_block
->
p_next
;
p_owner
->
buffer
.
i_count
--
;
b_has_more
=
p_owner
->
buffer
.
p_block
!=
NULL
;
if
(
!
b_has_more
)
p_owner
->
buffer
.
pp_block_next
=
&
p_owner
->
buffer
.
p_block
;
}
DecoderFixTs
(
p_dec
,
&
p_sout_block
->
i_dts
,
&
p_sout_block
->
i_pts
,
&
p_sout_block
->
i_length
,
&
p_sout_block
->
i_rate
,
NULL
,
b_telx
);
vlc_mutex_unlock
(
&
p_owner
->
lock
);
if
(
!
b_reject
)
sout_InputSendBuffer
(
p_owner
->
p_sout_input
,
p_sout_block
);
else
block_Release
(
p_sout_block
);
if
(
!
b_has_more
)
break
;
vlc_mutex_lock
(
&
p_owner
->
lock
);
if
(
!
p_owner
->
buffer
.
p_block
)
{
vlc_mutex_unlock
(
&
p_owner
->
lock
);
break
;
}
}
}
/* */
...
...
@@ -1581,6 +1641,14 @@ static void DecoderFlushBuffering( decoder_t *p_dec )
if
(
!
p_owner
->
buffer
.
p_subpic
)
p_owner
->
buffer
.
pp_subpic_next
=
&
p_owner
->
buffer
.
p_subpic
;
}
if
(
p_owner
->
buffer
.
p_block
)
{
block_ChainRelease
(
p_owner
->
buffer
.
p_block
);
p_owner
->
buffer
.
i_count
=
0
;
p_owner
->
buffer
.
p_block
=
NULL
;
p_owner
->
buffer
.
pp_block_next
=
&
p_owner
->
buffer
.
p_block
;
}
}
/* This function process a block for sout
...
...
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