]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/hlsenc.c
doc/muxers: fix typo of the hls var_stream_map example
[ffmpeg] / libavformat / hlsenc.c
index 258d0628bab279af34f41190475f10a62a01efc7..1613c3450982c4aec9ef4a6f674d2c23f2fefde5 100644 (file)
@@ -110,8 +110,8 @@ typedef struct VariantStream {
     unsigned var_stream_idx;
     unsigned number;
     int64_t sequence;
-    AVOutputFormat *oformat;
-    AVOutputFormat *vtt_oformat;
+    ff_const59 AVOutputFormat *oformat;
+    ff_const59 AVOutputFormat *vtt_oformat;
     AVIOContext *out;
     int packets_written;
     int init_range_length;
@@ -1830,7 +1830,7 @@ static int parse_variant_stream_mapstring(AVFormatContext *s)
     /**
      * Expected format for var_stream_map string is as below:
      * "a:0,v:0 a:1,v:1"
-     * "a:0,agroup:a0,default:1,language:ENG a:1,agroup:a1,defalut:0 v:0,agroup:a0  v:1,agroup:a1"
+     * "a:0,agroup:a0,default:1,language:ENG a:1,agroup:a1,default:0 v:0,agroup:a0  v:1,agroup:a1"
      * This string specifies how to group the audio, video and subtitle streams
      * into different variant streams. The variant stream groups are separated
      * by space.
@@ -2241,6 +2241,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
 
         new_start_pos = avio_tell(vs->avf->pb);
         if (hls->segment_type != SEGMENT_TYPE_FMP4) {
+            avio_flush(oc->pb);
             vs->size = new_start_pos - vs->start_pos;
         } else {
             vs->size = new_start_pos;