Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
47faceb4
Commit
47faceb4
authored
Nov 12, 2013
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zvbi: mimic cc.c for using subtitles updater etc to avoid flickering in text subtitles
parent
b5c3ef9f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
modules/codec/zvbi.c
modules/codec/zvbi.c
+16
-8
No files found.
modules/codec/zvbi.c
View file @
47faceb4
...
...
@@ -50,6 +50,7 @@
#include <libzvbi.h>
#include <vlc_codec.h>
#include "substext.h"
/*****************************************************************************
* Module descriptor.
...
...
@@ -379,7 +380,8 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
i_align
,
p_block
->
i_pts
);
if
(
!
p_spu
)
goto
error
;
p_spu
->
p_region
->
psz_text
=
strdup
(
""
);
subpicture_updater_sys_t
*
p_spu_sys
=
p_spu
->
updater
.
p_sys
;
p_spu_sys
->
text
=
strdup
(
""
);
p_sys
->
b_update
=
true
;
p_sys
->
i_last_page
=
i_wanted_page
;
...
...
@@ -431,7 +433,12 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
while
(
offset
<
i_total
&&
isspace
(
p_text
[
offset
]
)
)
offset
++
;
p_spu
->
p_region
->
psz_text
=
strdup
(
&
p_text
[
offset
]
);
subpicture_updater_sys_t
*
p_spu_sys
=
p_spu
->
updater
.
p_sys
;
p_spu_sys
->
text
=
strdup
(
&
p_text
[
offset
]
);
p_spu_sys
->
align
=
i_align
;
p_spu_sys
->
i_font_height_percent
=
5
;
#ifdef ZVBI_DEBUG
msg_Info
(
p_dec
,
"page %x-%x(%d)
\n\"
%s
\"
"
,
p_page
.
pgno
,
p_page
.
subno
,
i_total
,
&
p_text
[
offset
]
);
#endif
...
...
@@ -487,6 +494,9 @@ static subpicture_t *Subpicture( decoder_t *p_dec, video_format_t *p_fmt,
/* If there is a page or sub to render, then we do that here */
/* Create the subpicture unit */
if
(
b_text
)
p_spu
=
decoder_NewSubpictureText
(
p_dec
);
else
p_spu
=
decoder_NewSubpicture
(
p_dec
,
NULL
);
if
(
!
p_spu
)
{
...
...
@@ -525,13 +535,11 @@ static subpicture_t *Subpicture( decoder_t *p_dec, video_format_t *p_fmt,
p_spu
->
i_stop
=
i_pts
+
10000000
;
p_spu
->
b_ephemer
=
true
;
p_spu
->
b_absolute
=
b_text
?
false
:
true
;
p_spu
->
p_region
->
i_align
=
i_align
;
if
(
!
b_text
)
{
p_spu
->
p_region
->
i_align
=
i_align
;
p_spu
->
i_original_picture_width
=
fmt
.
i_width
;
p_spu
->
i_original_picture_height
=
fmt
.
i_height
;
}
/* */
*
p_fmt
=
fmt
;
...
...
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