aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-10-02 23:51:46 +0200
committerMartin Storsjö <martin@martin.st>2012-10-04 13:52:09 +0300
commitf7b240434c015056bc6319ddbdb8483757cc13e2 (patch)
tree6047efa518469b89268da0e77cc604c022d1f25d /libavformat
parent378a6315b7c48195ffd94e6aa9aa6d663d42b35e (diff)
downloadffmpeg-f7b240434c015056bc6319ddbdb8483757cc13e2.tar.gz
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>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/segment.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 53b8a239b5..bdb5254de4 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -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;