[FFmpeg-cvslog] lavf/segment: add EXT-X-MEDIA-SEQUENCE tag in M3U8 header
Stefano Sabatini
git at videolan.org
Tue Sep 4 11:42:36 CEST 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sat Sep 1 17:59:20 2012 +0200| [838b1d60a1c29659663ea3471de025b692298365] | committer: Stefano Sabatini
lavf/segment: add EXT-X-MEDIA-SEQUENCE tag in M3U8 header
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=838b1d60a1c29659663ea3471de025b692298365
---
libavformat/segment.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/segment.c b/libavformat/segment.c
index fe4addd..e94d639 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -54,6 +54,7 @@ typedef struct {
AVFormatContext *avf;
char *format; ///< format to use for output segment files
char *list; ///< filename for the segment list file
+ int list_count; ///< list counter
int list_size; ///< number of entries for the segment list file
double list_max_segment_time; ///< max segment time in the current list
ListType list_type; ///< set the list type
@@ -154,6 +155,7 @@ static int segment_list_open(AVFormatContext *s)
if (seg->list_type == LIST_TYPE_M3U8) {
avio_printf(seg->list_pb, "#EXTM3U\n");
avio_printf(seg->list_pb, "#EXT-X-VERSION:3\n");
+ avio_printf(seg->list_pb, "#EXT-X-MEDIA-SEQUENCE:%d\n", seg->list_count);
}
return ret;
@@ -168,6 +170,7 @@ static void segment_list_close(AVFormatContext *s)
(int)ceil(seg->list_max_segment_time));
avio_printf(seg->list_pb, "#EXT-X-ENDLIST\n");
}
+ seg->list_count++;
avio_close(seg->list_pb);
}
More information about the ffmpeg-cvslog
mailing list