[FFmpeg-devel] [PATCH 16/17] avformat/assenc: mux an event header if none are found in extradata

Nicolas George george at nsup.org
Wed Sep 24 13:20:36 CEST 2014


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.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140924/d02ad2c4/attachment.asc>


More information about the ffmpeg-devel mailing list