提交 f7b24043 编写于 作者: M Martin Storsjö

segment: Set the resend_headers flag for each segment

This makes sure new inline headers are emitted when the next
packet is written. This allows segmenting mpegts without calling
write_header/write_trailer (nor freeing/reiniting the muxer)
for each segment.
Signed-off-by: NMartin Storsjö <martin@martin.st>
上级 378a6315
......@@ -96,6 +96,9 @@ static int segment_start(AVFormatContext *s, int write_header)
&s->interrupt_callback, NULL)) < 0)
return err;
if (oc->oformat->priv_class && oc->priv_data)
av_opt_set(oc->priv_data, "resend_headers", "1", 0);
if (write_header) {
if ((err = avformat_write_header(oc, NULL)) < 0)
return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册