[FFmpeg-devel] ffmpeg patch for nonmonolithic increase dts error in subtitle

Michael Niedermayer michael at niedermayer.cc
Sat Jun 23 02:14:11 EEST 2018


On Thu, Jun 21, 2018 at 09:11:56PM +0200, Michael Niedermayer wrote:
> On Thu, Jun 21, 2018 at 02:27:29PM +0200, Carl Eugen Hoyos wrote:
> > 2018-06-21 13:55 GMT+02:00, Moritz Barsnick <barsnick at gmx.net>:
> > > On Thu, Jun 21, 2018 at 10:51:33 +0200, Carl Eugen Hoyos wrote:
> > 
> > >> Who wrote the patch / where did you find it?
> > >
> > > The ticket he mentioned was #4450, the patch is here:
> > > https://trac.ffmpeg.org/ticket/4450#comment:6
> > 
> > Patch attached (untested).
> > 
> > Thank you, Carl Eugen
> 
> >  ffmpeg.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 1b6b6990b1e8bf9885dd55431ccbe64da8553504  0001-ffmpeg-Treat-subtitles-like-audio-and-video-for-non-.patch
> > From 6ff1a1c662211548ae3c8c01ddfc2775e03b2497 Mon Sep 17 00:00:00 2001
> > From: Hans Carlson <forbyta at gmx.com>
> > Date: Thu, 21 Jun 2018 14:24:36 +0200
> > Subject: [PATCH] ffmpeg: Treat subtitles like audio and video for
> >  non-monotonic dts.
> > 
> > Fixes ticket #4450.
> > Fixes ticket #6248.
> > ---
> >  fftools/ffmpeg.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> > index 6dfab64..8d311a9 100644
> > --- a/fftools/ffmpeg.c
> > +++ b/fftools/ffmpeg.c
> > @@ -772,7 +772,7 @@ static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int u
> >                       - FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1)
> >                       - FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1);
> >          }
> > -        if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) &&
> > +        if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) &&
> >              pkt->dts != AV_NOPTS_VALUE &&
> >              !(st->codecpar->codec_id == AV_CODEC_ID_VP9 && ost->stream_copy) &&
> >              ost->last_mux_dts != AV_NOPTS_VALUE) {
> 
> probably ok, but please wait a day or 2 so others can comment too

will apply, this patch also was on the bug tracker for a long time already

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Never trust a computer, one day, it may think you are the virus. -- Compn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180623/bf525533/attachment.sig>


More information about the ffmpeg-devel mailing list