[FFmpeg-cvslog] segment: Set the resend_headers flag for each segment

Martin Storsjö git at videolan.org
Fri Oct 5 16:37:45 CEST 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Oct  2 23:51:46 2012 +0200| [f7b240434c015056bc6319ddbdb8483757cc13e2] | committer: 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: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f7b240434c015056bc6319ddbdb8483757cc13e2
---

 libavformat/segment.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index 53b8a23..bdb5254 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;



More information about the ffmpeg-cvslog mailing list