Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
c216324a
Commit
c216324a
authored
Sep 21, 2015
by
wm4
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/subtitles: make dropping duplicate events optional
parent
a47ad06b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
subtitles.c
libavformat/subtitles.c
+2
-1
subtitles.h
libavformat/subtitles.h
+1
-0
No files found.
libavformat/subtitles.c
View file @
c216324a
...
...
@@ -204,7 +204,8 @@ void ff_subtitles_queue_finalize(void *log_ctx, FFDemuxSubtitlesQueue *q)
if
(
q
->
subs
[
i
].
duration
==
-
1
&&
i
<
q
->
nb_subs
-
1
)
q
->
subs
[
i
].
duration
=
q
->
subs
[
i
+
1
].
pts
-
q
->
subs
[
i
].
pts
;
drop_dups
(
log_ctx
,
q
);
if
(
!
q
->
keep_duplicates
)
drop_dups
(
log_ctx
,
q
);
}
int
ff_subtitles_queue_read_packet
(
FFDemuxSubtitlesQueue
*
q
,
AVPacket
*
pkt
)
...
...
libavformat/subtitles.h
View file @
c216324a
...
...
@@ -105,6 +105,7 @@ typedef struct {
int
allocated_size
;
///< allocated size for subs
int
current_sub_idx
;
///< current position for the read packet callback
enum
sub_sort
sort
;
///< sort method to use when finalizing subtitles
int
keep_duplicates
;
///< set to 1 to keep duplicated subtitle events
}
FFDemuxSubtitlesQueue
;
/**
...
...
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