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
d53b7dc4
Commit
d53b7dc4
authored
Mar 07, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: ts: send discontinuity flagged block to es on seek
parent
2b09f7f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
modules/demux/ts.c
modules/demux/ts.c
+19
-6
No files found.
modules/demux/ts.c
View file @
d53b7dc4
...
...
@@ -513,7 +513,7 @@ static block_t* ReadTSPacket( demux_t *p_demux );
static
int
ProbeStart
(
demux_t
*
p_demux
,
int
i_program
);
static
int
ProbeEnd
(
demux_t
*
p_demux
,
int
i_program
);
static
int
SeekToTime
(
demux_t
*
p_demux
,
ts_pmt_t
*
,
int64_t
time
);
static
void
ReadyQueuesPostSeek
(
demux_
sys_t
*
p_sys
);
static
void
ReadyQueuesPostSeek
(
demux_
t
*
p_demux
);
static
void
PCRHandle
(
demux_t
*
p_demux
,
ts_pid_t
*
,
block_t
*
);
static
void
PCRFixHandle
(
demux_t
*
,
ts_pmt_t
*
,
block_t
*
);
static
int64_t
TimeStampWrapAround
(
ts_pmt_t
*
,
int64_t
);
...
...
@@ -1509,7 +1509,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
if
(
!
DVBEventInformation
(
p_demux
,
&
i_time
,
&
i_length
)
&&
i_length
>
0
&&
!
SeekToTime
(
p_demux
,
p_pmt
,
TO_SCALE
(
i_length
)
*
f
)
)
{
ReadyQueuesPostSeek
(
p_
sys
);
ReadyQueuesPostSeek
(
p_
demux
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
TO_SCALE
(
i_length
)
*
f
);
return
VLC_SUCCESS
;
...
...
@@ -1525,7 +1525,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
p_pmt
->
i_last_dts
)
-
p_pmt
->
pcr
.
i_first
;
if
(
!
SeekToTime
(
p_demux
,
p_pmt
,
p_pmt
->
pcr
.
i_first
+
i_length
*
f
)
)
{
ReadyQueuesPostSeek
(
p_
sys
);
ReadyQueuesPostSeek
(
p_
demux
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
FROM_SCALE
(
p_pmt
->
pcr
.
i_first
+
i_length
*
f
)
);
return
VLC_SUCCESS
;
...
...
@@ -1536,7 +1536,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
if
(
i64
>
0
&&
stream_Seek
(
p_sys
->
stream
,
(
int64_t
)(
i64
*
f
)
)
==
VLC_SUCCESS
)
{
ReadyQueuesPostSeek
(
p_
sys
);
ReadyQueuesPostSeek
(
p_
demux
);
return
VLC_SUCCESS
;
}
break
;
...
...
@@ -1549,7 +1549,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
p_pmt
->
pcr
.
i_first
>
-
1
&&
!
SeekToTime
(
p_demux
,
p_pmt
,
p_pmt
->
pcr
.
i_first
+
TO_SCALE
(
i64
)
)
)
{
ReadyQueuesPostSeek
(
p_
sys
);
ReadyQueuesPostSeek
(
p_
demux
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
FROM_SCALE
(
p_pmt
->
pcr
.
i_first
)
+
i64
-
VLC_TS_0
);
return
VLC_SUCCESS
;
...
...
@@ -2631,8 +2631,10 @@ static inline void FlushESBuffer( ts_pes_t *p_pes )
}
}
static
void
ReadyQueuesPostSeek
(
demux_
sys_t
*
p_sys
)
static
void
ReadyQueuesPostSeek
(
demux_
t
*
p_demux
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
ts_pat_t
*
p_pat
=
p_sys
->
pid
[
0
].
u
.
p_pat
;
for
(
int
i
=
0
;
i
<
p_pat
->
programs
.
i_size
;
i
++
)
{
...
...
@@ -2644,6 +2646,17 @@ static void ReadyQueuesPostSeek( demux_sys_t *p_sys )
if
(
pid
->
type
!=
TYPE_PES
)
continue
;
if
(
!
pid
->
u
.
p_pes
->
es
.
id
)
{
block_t
*
p_block
=
block_Alloc
(
1
);
if
(
p_block
)
{
p_block
->
i_buffer
=
0
;
p_block
->
i_flags
=
BLOCK_FLAG_DISCONTINUITY
|
BLOCK_FLAG_CORRUPTED
;
es_out_Send
(
p_demux
->
out
,
pid
->
u
.
p_pes
->
es
.
id
,
p_block
);
}
}
pid
->
i_cc
=
0xff
;
if
(
pid
->
u
.
p_pes
->
p_prepcr_outqueue
)
...
...
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