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
06844395
Commit
06844395
authored
Apr 07, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ALL: use p_block->i_length for text subtitles duration (instead of the i_dts hack).
parent
9c615be0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
28 deletions
+25
-28
modules/codec/subsdec.c
modules/codec/subsdec.c
+3
-3
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+1
-8
modules/demux/ogg.c
modules/demux/ogg.c
+14
-11
modules/demux/util/sub.c
modules/demux/util/sub.c
+7
-6
No files found.
modules/codec/subsdec.c
View file @
06844395
...
...
@@ -371,9 +371,9 @@ static void ParseText( decoder_t *p_dec, block_t *p_block,
}
vout_ShowTextAbsolute
(
p_vout
,
psz_subtitle
,
NULL
,
OSD_ALIGN_BOTTOM
|
p_sys
->
i_align
,
i_align_h
,
i_align_v
,
p_block
->
i_pts
,
p_block
->
i_dts
);
OSD_ALIGN_BOTTOM
|
p_sys
->
i_align
,
i_align_h
,
i_align_v
,
p_block
->
i_pts
,
p_block
->
i_length
?
p_block
->
i_pts
+
p_block
->
i_length
:
0
);
free
(
psz_subtitle
);
}
modules/demux/mkv.cpp
View file @
06844395
...
...
@@ -1532,14 +1532,7 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts, mtime
if
(
tk
.
fmt
.
i_cat
==
SPU_ES
&&
strcmp
(
tk
.
psz_codec
,
"S_VOBSUB"
)
)
{
if
(
i_duration
>
0
)
{
p_block
->
i_dts
+=
i_duration
*
1000
;
}
else
{
p_block
->
i_dts
=
0
;
}
p_block
->
i_length
=
i_duration
*
1000
;
}
es_out_Send
(
p_demux
->
out
,
tk
.
p_es
,
p_block
);
...
...
modules/demux/ogg.c
View file @
06844395
...
...
@@ -327,7 +327,8 @@ static int Demux( demux_t * p_demux )
}
else
{
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_PCR
,
p_stream
->
i_pcr
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_PCR
,
p_stream
->
i_pcr
);
}
continue
;
}
...
...
@@ -394,9 +395,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
ogg_sync_reset
(
&
p_sys
->
oy
);
default:
return
demux2_vaControlHelper
(
p_demux
->
s
,
0
,
-
1
,
p_sys
->
i_bitrate
,
1
,
i_query
,
args
);
return
demux2_vaControlHelper
(
p_demux
->
s
,
0
,
-
1
,
p_sys
->
i_bitrate
,
1
,
i_query
,
args
);
}
}
...
...
@@ -464,8 +464,9 @@ static void Ogg_UpdatePCR( logical_stream_t *p_stream,
/* 1 frame per packet */
p_stream
->
i_interpolated_pcr
+=
(
I64C
(
1000000
)
/
p_stream
->
f_rate
);
else
if
(
p_stream
->
fmt
.
i_bitrate
)
p_stream
->
i_interpolated_pcr
+=
(
p_oggpacket
->
bytes
*
I64C
(
1000000
)
/
p_stream
->
fmt
.
i_bitrate
/
8
);
p_stream
->
i_interpolated_pcr
+=
(
p_oggpacket
->
bytes
*
I64C
(
1000000
)
/
p_stream
->
fmt
.
i_bitrate
/
8
);
}
}
...
...
@@ -615,7 +616,8 @@ static void Ogg_DecodePacket( demux_t *p_demux,
{
/* Set correct starting date in header packets */
p_stream
->
p_packets_backup
[
i
].
granulepos
=
p_stream
->
i_interpolated_pcr
*
p_stream
->
f_rate
/
I64C
(
1000000
);
p_stream
->
i_interpolated_pcr
*
p_stream
->
f_rate
/
I64C
(
1000000
);
Ogg_DecodePacket
(
p_demux
,
p_stream
,
&
p_stream
->
p_packets_backup
[
i
]
);
...
...
@@ -638,7 +640,8 @@ static void Ogg_DecodePacket( demux_t *p_demux,
es_out_Control
(
p_demux
->
out
,
ES_OUT_RESET_PCR
);
/* Call the pace control */
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_PCR
,
p_stream
->
i_pcr
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_PCR
,
p_stream
->
i_pcr
);
}
p_stream
->
i_previous_pcr
=
p_stream
->
i_pcr
;
...
...
@@ -690,8 +693,8 @@ static void Ogg_DecodePacket( demux_t *p_demux,
p_block
->
i_dts
=
p_block
->
i_pts
=
i_pts
;
else
if
(
p_stream
->
fmt
.
i_cat
==
SPU_ES
)
{
p_block
->
i_pts
=
i_pts
;
p_block
->
i_
dts
=
0
;
p_block
->
i_
dts
=
p_block
->
i_
pts
=
i_pts
;
p_block
->
i_
length
=
0
;
}
else
if
(
p_stream
->
fmt
.
i_codec
==
VLC_FOURCC
(
't'
,
'h'
,
'e'
,
'o'
)
)
p_block
->
i_dts
=
p_block
->
i_pts
=
i_pts
;
...
...
@@ -731,7 +734,7 @@ static void Ogg_DecodePacket( demux_t *p_demux,
p_oggpacket
->
packet
[
i_header_len
+
1
]
!=
'\n'
&&
p_oggpacket
->
packet
[
i_header_len
+
1
]
!=
'\r'
)
)
{
p_block
->
i_
dts
=
p_block
->
i_pts
+
(
mtime_t
)
lenbytes
*
1000
;
p_block
->
i_
length
=
(
mtime_t
)
lenbytes
*
1000
;
}
}
...
...
modules/demux/util/sub.c
View file @
06844395
...
...
@@ -566,14 +566,15 @@ static int sub_demux( subtitle_demux_t *p_sub, mtime_t i_maxdate )
}
p_block
->
i_pts
=
p_sub
->
subtitle
[
p_sub
->
i_subtitle
].
i_start
;
p_block
->
i_dts
=
0
;
p_block
->
i_dts
=
p_block
->
i_pts
;
if
(
p_sub
->
subtitle
[
p_sub
->
i_subtitle
].
i_stop
>
0
)
{
/* FIXME kludge i_dts means end of display... */
p_block
->
i_dts
=
p_sub
->
subtitle
[
p_sub
->
i_subtitle
].
i_stop
;
p_block
->
i_length
=
p_sub
->
subtitle
[
p_sub
->
i_subtitle
].
i_stop
-
p_block
->
i_pts
;
}
memcpy
(
p_block
->
p_buffer
,
p_sub
->
subtitle
[
p_sub
->
i_subtitle
].
psz_text
,
i_len
);
memcpy
(
p_block
->
p_buffer
,
p_sub
->
subtitle
[
p_sub
->
i_subtitle
].
psz_text
,
i_len
);
if
(
p_block
->
i_pts
>
0
)
{
es_out_Send
(
p_input
->
p_es_out
,
p_sub
->
p_es
,
p_block
);
...
...
@@ -1329,8 +1330,8 @@ static int DemuxVobSub( subtitle_demux_t *p_demux, block_t *p_bk )
/* FIXME i_spu == determines which of the spu tracks we will show. */
if
(
p_demux
->
p_es
&&
i_spu
==
0
)
{
p_pkt
->
i_pts
=
p_bk
->
i_pts
;
p_pkt
->
i_
dts
=
0
;
p_pkt
->
i_
dts
=
p_pkt
->
i_
pts
=
p_bk
->
i_pts
;
p_pkt
->
i_
length
=
0
;
es_out_Send
(
p_demux
->
p_input
->
p_es_out
,
p_demux
->
p_es
,
p_pkt
);
p_bk
->
i_pts
=
0
;
/* only first packet has a pts */
...
...
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