[FFmpeg-devel] [PATCH] avformat/dashenc : Fix streaming mode support for webm output

Karthick J kjeyapal at akamai.com
Mon Apr 8 13:18:24 EEST 2019


---
 libavformat/dashenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index f8d71166d4..9dd520787f 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1750,10 +1750,10 @@ static int dash_write_packet(AVFormatContext *s, AVPacket *pkt)
     }
 
     //write out the data immediately in streaming mode
-    if (c->streaming && os->segment_type == SEGMENT_TYPE_MP4) {
+    if (c->streaming) {
         int len = 0;
         uint8_t *buf = NULL;
-        if (!os->written_len)
+        if (!os->written_len && os->segment_type == SEGMENT_TYPE_MP4)
             write_styp(os->ctx->pb);
         avio_flush(os->ctx->pb);
         len = avio_get_dyn_buf (os->ctx->pb, &buf);
-- 
2.20.1 (Apple Git-117)



More information about the ffmpeg-devel mailing list