[FFmpeg-devel] [PATCH 3/3] avformat/assdec: do not drop duplicate subtitles

Clément Bœsch u at pkh.me
Sun Sep 20 22:59:56 CEST 2015


On Sun, Sep 20, 2015 at 04:12:38PM +0200, wm4 wrote:
> Duplicates are perfectly legitimate with this format.
> ---
>  libavformat/assdec.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/assdec.c b/libavformat/assdec.c
> index 5423c03..a9a2efa 100644
> --- a/libavformat/assdec.c
> +++ b/libavformat/assdec.c
> @@ -125,6 +125,8 @@ static int ass_read_header(AVFormatContext *s)
>      av_bprint_init(&line,   0, AV_BPRINT_SIZE_UNLIMITED);
>      av_bprint_init(&rline,  0, AV_BPRINT_SIZE_UNLIMITED);
>  
> +    ass->q.keep_duplicates = 1;
> +
>      for (;;) {
>          int64_t pos = get_line(&line, &tr);
>          int64_t ts_start = AV_NOPTS_VALUE;

I'm not sure why ASS in particular but I guess it's fine, feel free to
push

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150920/22ae64c3/attachment.sig>


More information about the ffmpeg-devel mailing list