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
020a4dea
Commit
020a4dea
authored
Feb 07, 2015
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PGS: fix end-time
Close #13744
parent
69ff84b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
modules/codec/avcodec/subtitle.c
modules/codec/avcodec/subtitle.c
+4
-1
No files found.
modules/codec/avcodec/subtitle.c
View file @
020a4dea
...
...
@@ -40,6 +40,7 @@
struct
decoder_sys_t
{
AVCODEC_COMMON_MEMBERS
bool
b_need_ephemer
;
/* Does the format need the ephemer flag (no end time set) */
};
static
subpicture_t
*
ConvertSubtitle
(
decoder_t
*
,
AVSubtitle
*
,
mtime_t
pts
,
...
...
@@ -73,6 +74,7 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
sys
->
p_context
=
context
;
sys
->
p_codec
=
codec
;
sys
->
b_delayed_open
=
false
;
sys
->
b_need_ephemer
=
codec
->
id
==
AV_CODEC_ID_HDMV_PGS_SUBTITLE
;
/* */
context
->
extradata_size
=
0
;
...
...
@@ -244,7 +246,8 @@ static subpicture_t *ConvertSubtitle(decoder_t *dec, AVSubtitle *ffsub, mtime_t
spu
->
i_start
=
pts
+
ffsub
->
start_display_time
*
INT64_C
(
1000
);
spu
->
i_stop
=
pts
+
ffsub
->
end_display_time
*
INT64_C
(
1000
);
spu
->
b_absolute
=
true
;
/* We have offset and size for subtitle */
spu
->
b_ephemer
=
false
;
/* We only show subtitle for i_stop time only */
spu
->
b_ephemer
=
dec
->
p_sys
->
b_need_ephemer
;
/* We only show subtitle for i_stop time only */
if
(
avctx
->
coded_width
!=
0
&&
avctx
->
coded_height
!=
0
)
{
spu
->
i_original_picture_width
=
avctx
->
coded_width
;
...
...
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