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
918f4453
Commit
918f4453
authored
Apr 06, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: ogg: don't send invalid dts stamps and use last pts as chained pcr
parent
751ecf1c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
modules/demux/ogg.c
modules/demux/ogg.c
+16
-4
modules/demux/ogg.h
modules/demux/ogg.h
+1
-0
No files found.
modules/demux/ogg.c
View file @
918f4453
...
@@ -304,6 +304,7 @@ static int Demux( demux_t * p_demux )
...
@@ -304,6 +304,7 @@ static int Demux( demux_t * p_demux )
}
}
Ogg_EndOfStream
(
p_demux
);
Ogg_EndOfStream
(
p_demux
);
p_sys
->
b_chained_boundary
=
true
;
p_sys
->
b_chained_boundary
=
true
;
p_sys
->
i_nzpcr_offset
=
p_sys
->
i_nzlast_pts
;
}
}
if
(
Ogg_BeginningOfStream
(
p_demux
)
!=
VLC_SUCCESS
)
if
(
Ogg_BeginningOfStream
(
p_demux
)
!=
VLC_SUCCESS
)
...
@@ -399,8 +400,7 @@ static int Demux( demux_t * p_demux )
...
@@ -399,8 +400,7 @@ static int Demux( demux_t * p_demux )
{
{
msg_Err
(
p_demux
,
"Broken Ogg stream (serialno) mismatch"
);
msg_Err
(
p_demux
,
"Broken Ogg stream (serialno) mismatch"
);
Ogg_ResetStream
(
p_stream
);
Ogg_ResetStream
(
p_stream
);
p_sys
->
i_nzpcr_offset
=
(
p_sys
->
i_pcr
>=
VLC_TS_INVALID
)
?
p_sys
->
i_nzpcr_offset
=
p_sys
->
i_nzlast_pts
;
p_sys
->
i_pcr
-
VLC_TS_0
:
0
;
ogg_stream_reset_serialno
(
&
p_stream
->
os
,
ogg_page_serialno
(
&
p_sys
->
current_page
)
);
ogg_stream_reset_serialno
(
&
p_stream
->
os
,
ogg_page_serialno
(
&
p_sys
->
current_page
)
);
}
}
...
@@ -1106,8 +1106,19 @@ static void Ogg_SendOrQueueBlocks( demux_t *p_demux, logical_stream_t *p_stream,
...
@@ -1106,8 +1106,19 @@ static void Ogg_SendOrQueueBlocks( demux_t *p_demux, logical_stream_t *p_stream,
temp
=
temp
->
p_next
;
temp
=
temp
->
p_next
;
tosend
->
p_next
=
NULL
;
tosend
->
p_next
=
NULL
;
DemuxDebug
(
msg_Dbg
(
p_demux
,
"block sent from preparse > pts %"
PRId64
" spcr %"
PRId64
" pcr %"
PRId64
,
if
(
tosend
->
i_pts
<
VLC_TS_0
)
tosend
->
i_pts
,
p_stream
->
i_pcr
,
p_ogg
->
i_pcr
);
)
{
/* Don't send metadata from chained streams */
block_Release
(
tosend
);
continue
;
}
else
if
(
tosend
->
i_dts
<
VLC_TS_0
)
{
tosend
->
i_dts
=
tosend
->
i_pts
;
}
DemuxDebug
(
msg_Dbg
(
p_demux
,
"block sent from preparse > dts %"
PRId64
" pts %"
PRId64
" spcr %"
PRId64
" pcr %"
PRId64
,
tosend
->
i_dts
,
tosend
->
i_pts
,
p_stream
->
i_pcr
,
p_ogg
->
i_pcr
);
)
es_out_Send
(
p_demux
->
out
,
p_stream
->
p_es
,
tosend
);
es_out_Send
(
p_demux
->
out
,
p_stream
->
p_es
,
tosend
);
if
(
p_ogg
->
i_pcr
<
VLC_TS_0
&&
i_firstpts
>
VLC_TS_INVALID
)
if
(
p_ogg
->
i_pcr
<
VLC_TS_0
&&
i_firstpts
>
VLC_TS_INVALID
)
...
@@ -1121,6 +1132,7 @@ static void Ogg_SendOrQueueBlocks( demux_t *p_demux, logical_stream_t *p_stream,
...
@@ -1121,6 +1132,7 @@ static void Ogg_SendOrQueueBlocks( demux_t *p_demux, logical_stream_t *p_stream,
if
(
p_block
)
if
(
p_block
)
{
{
p_ogg
->
i_nzlast_pts
=
(
p_block
->
i_pts
>
VLC_TS_INVALID
)
?
p_block
->
i_pts
-
VLC_TS_0
:
0
;
DemuxDebug
(
msg_Dbg
(
p_demux
,
"block sent directly > pts %"
PRId64
" spcr %"
PRId64
" pcr %"
PRId64
,
DemuxDebug
(
msg_Dbg
(
p_demux
,
"block sent directly > pts %"
PRId64
" spcr %"
PRId64
" pcr %"
PRId64
,
p_block
->
i_pts
,
p_stream
->
i_pcr
,
p_ogg
->
i_pcr
)
);
p_block
->
i_pts
,
p_stream
->
i_pcr
,
p_ogg
->
i_pcr
)
);
es_out_Send
(
p_demux
->
out
,
p_stream
->
p_es
,
p_block
);
es_out_Send
(
p_demux
->
out
,
p_stream
->
p_es
,
p_block
);
...
...
modules/demux/ogg.h
View file @
918f4453
...
@@ -179,6 +179,7 @@ struct demux_sys_t
...
@@ -179,6 +179,7 @@ struct demux_sys_t
* the sub-streams */
* the sub-streams */
mtime_t
i_pcr
;
mtime_t
i_pcr
;
mtime_t
i_nzpcr_offset
;
mtime_t
i_nzpcr_offset
;
mtime_t
i_nzlast_pts
;
/* informative only */
/* informative only */
mtime_t
i_pcr_jitter
;
mtime_t
i_pcr_jitter
;
int64_t
i_access_delay
;
int64_t
i_access_delay
;
...
...
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