Commit 937aac4f authored by Clément Bœsch's avatar Clément Bœsch

avformat/assenc: make sure we crawl extradata only if it's non-null

parent d2463971
......@@ -53,9 +53,9 @@ static int write_header(AVFormatContext *s)
avio_write(s->pb, avctx->extradata, avctx->extradata_size);
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment