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: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
378a6315b7
commit
f7b240434c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user