diff mbox

[FFmpeg-devel,1/1] avformat/dashenc: fix for segment open issue when persistent connection is enabled

Message ID 1519627924-27570-1-git-send-email-vdixit@akamai.com
State Superseded
Headers show

Commit Message

Dixit, Vishwanath Feb. 26, 2018, 6:52 a.m. UTC
From: Vishwanath Dixit <vdixit@akamai.com>

---
 libavformat/dashenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index d6474f3..6fad24e 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1305,7 +1305,7 @@  static int dash_write_packet(AVFormatContext *s, AVPacket *pkt)
         flush_init_segment(s, os);
 
     //open the output context when the first frame of a segment is ready
-    if (!c->single_file && !os->out) {
+    if (!c->single_file && os->packets_written == 1) {
         AVDictionary *opts = NULL;
         const char *proto = avio_find_protocol_name(s->filename);
         int use_rename = proto && !strcmp(proto, "file");