Browse code

lavf/segment: add segment_start_number option

Consistent with the image2 muxer.

Stefano Sabatini authored on 2012/12/10 02:21:00
Showing 3 changed files
... ...
@@ -602,6 +602,9 @@ separated duration specifications, in increasing order.
602 602
 @item segment_wrap @var{limit}
603 603
 Wrap around segment index once it reaches @var{limit}.
604 604
 
605
+@item segment_start_number @var{number}
606
+Set the sequence number of the first segment. Defaults to @code{0}.
607
+
605 608
 @item reset_timestamps @var{1|0}
606 609
 Reset timestamps at the begin of each segment, so that each segment
607 610
 will start with near-zero timestamps. It is meant to ease the playback
... ...
@@ -577,6 +577,7 @@ static const AVOption options[] = {
577 577
     { "segment_time_delta","set approximation value used for the segment times", OFFSET(time_delta_str), AV_OPT_TYPE_STRING, {.str = "0"}, 0, 0, E },
578 578
     { "segment_times",     "set segment split time points",              OFFSET(times_str),AV_OPT_TYPE_STRING,{.str = NULL},  0, 0,       E },
579 579
     { "segment_wrap",      "set number after which the index wraps",     OFFSET(segment_idx_wrap), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E },
580
+    { "segment_start_number", "set the sequence number of the first segment", OFFSET(segment_idx), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E },
580 581
 
581 582
     { "individual_header_trailer", "write header/trailer to each segment", OFFSET(individual_header_trailer), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, E },
582 583
     { "write_header_trailer", "write a header to the first segment and a trailer to the last one", OFFSET(write_header_trailer), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, E },
... ...
@@ -31,7 +31,7 @@
31 31
 
32 32
 #define LIBAVFORMAT_VERSION_MAJOR 54
33 33
 #define LIBAVFORMAT_VERSION_MINOR 49
34
-#define LIBAVFORMAT_VERSION_MICRO 101
34
+#define LIBAVFORMAT_VERSION_MICRO 102
35 35
 
36 36
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
37 37
                                                LIBAVFORMAT_VERSION_MINOR, \