OSDN Git Service

movenc: Expose the fragment index as an avoption
authorMartin Storsjö <martin@martin.st>
Mon, 3 Nov 2014 20:38:09 +0000 (22:38 +0200)
committerMartin Storsjö <martin@martin.st>
Wed, 26 Nov 2014 07:58:13 +0000 (09:58 +0200)
This allows setting the right fragment number if doing
random-access writing of fragments, and also allows reading the
current sequence number.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/movenc.c

index 80531d0..f6109e6 100644 (file)
@@ -71,6 +71,7 @@ static const AVOption options[] = {
     { "ism_lookahead", "Number of lookahead entries for ISM files", offsetof(MOVMuxContext, ism_lookahead), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
     { "brand",    "Override major brand", offsetof(MOVMuxContext, major_brand),   AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM },
     { "use_editlist", "use edit list", offsetof(MOVMuxContext, use_editlist), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, AV_OPT_FLAG_ENCODING_PARAM},
+    { "fragment_index", "Fragment number of the next fragment", offsetof(MOVMuxContext, fragments), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
     { NULL },
 };