mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/assenc: make sure we crawl extradata only if it's non-null
This commit is contained in:
parent
d246397161
commit
937aac4f97
@ -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");
|
||||
}
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user