mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 19:58:59 +00:00
avformat/subtitles: make dropping duplicate events optional
This commit is contained in:
parent
a47ad06baf
commit
c216324a7f
@ -204,6 +204,7 @@ 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;
|
||||
|
||||
if (!q->keep_duplicates)
|
||||
drop_dups(log_ctx, q);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user