Browse Source

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>
tags/n1.1
Martin Storsjö 13 years ago
parent
commit
f7b240434c
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/segment.c

+ 3
- 0
libavformat/segment.c View File

@@ -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…
Cancel
Save