On Wed, Sep 24, 2014 at 01:20:36PM +0200, Nicolas George wrote:
> Le jour de la Raison, an CCXXII, Clément Bœsch a écrit :
> > ---
> >  libavformat/assenc.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/libavformat/assenc.c b/libavformat/assenc.c
> > index 236d021..5779e92 100644
> > --- a/libavformat/assenc.c
> > +++ b/libavformat/assenc.c
> > @@ -54,6 +54,8 @@ static int write_header(AVFormatContext *s)
> >          if (avctx->extradata[avctx->extradata_size - 1] != '\n')
> >              avio_write(s->pb, "\r\n", 2);
> >      }
> > +    if (!strstr(avctx->extradata, "\n[Events]"))
> > +        avio_printf(s->pb, "[Events]\r\nFormat: Layer, Start, End, Style, 
> > Actor, MarginL, MarginR, MarginV, Effect, Text\r\n");
> >      avio_flush(s->pb);
> >  
> >      return 0;
> 
> Can you point out in what case it is necessary? Broken input file?
> 
> Maybe a warning should be printed.
> 
No, this happens when people follow the specifications from matroska:
these two lines are not supposed to be muxed into the
CodecPrivate/extradata. That doesn't happen in practice (because you need
to store the Comments below the Format line, in the CodecPrivate), but it
can happen, and mkvextract seems to be able to deal with that by doing
something similar to that.

[...]

-- 
Clément B.

Attachment: pgpqO1B0IUCdk.pgp
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to