[FFmpeg-devel] [PATCH] lavf/segment: change default value for segment_list_size option, from 5 to 0

Clément Bœsch ubitux at gmail.com
Sat Aug 18 11:40:19 CEST 2012


On Thu, Aug 16, 2012 at 12:24:14AM +0200, Stefano Sabatini wrote:
> This is technically a major compatibility break, but seems the most
> natural default and what users would expect without reading the docs.
> 
> FIXME: bump micro
> ---
>  doc/muxers.texi       |    2 +-
>  libavformat/segment.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index ece4452..99d1232 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -448,7 +448,7 @@ Generate also a listfile named @var{name}. If not specified no
>  listfile is generated.
>  @item segment_list_size @var{size}
>  Overwrite the listfile once it reaches @var{size} entries. If 0
> -the listfile is never overwritten. Default value is 5.
> +the listfile is never overwritten. Default value is 0.
>  @item segment_list type @var{type}
>  Specify the format for the segment list file.
>  
> diff --git a/libavformat/segment.c b/libavformat/segment.c
> index 1a0b7d5..5c12586 100644
> --- a/libavformat/segment.c
> +++ b/libavformat/segment.c
> @@ -418,7 +418,7 @@ static int seg_write_trailer(struct AVFormatContext *s)
>  static const AVOption options[] = {
>      { "segment_format",    "set container format used for the segments", OFFSET(format),  AV_OPT_TYPE_STRING, {.str = NULL},  0, 0,       E },
>      { "segment_list",      "set the segment list filename",              OFFSET(list),    AV_OPT_TYPE_STRING, {.str = NULL},  0, 0,       E },
> -    { "segment_list_size", "set the maximum number of playlist entries", OFFSET(list_size), AV_OPT_TYPE_INT,  {.dbl = 5},     0, INT_MAX, E },
> +    { "segment_list_size", "set the maximum number of playlist entries", OFFSET(list_size), AV_OPT_TYPE_INT,  {.dbl = 0},     0, INT_MAX, E },
>      { "segment_list_type", "set the segment list type",                  OFFSET(list_type), AV_OPT_TYPE_INT,  {.dbl = LIST_TYPE_UNDEFINED}, -1, LIST_TYPE_NB-1, E, "list_type" },
>      { "flat", "flat format",     0, AV_OPT_TYPE_CONST, {.dbl=LIST_TYPE_FLAT }, INT_MIN, INT_MAX, 0, "list_type" },
>      { "ext",  "extended format", 0, AV_OPT_TYPE_CONST, {.dbl=LIST_TYPE_EXT  }, INT_MIN, INT_MAX, 0, "list_type" },

Sounds a lot saner to me, so OK.

About the bump, I don't think anyone is relying on this particular default
anyway. Even if someone is using that limit it is likely set to some
particular value.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120818/3ed5989a/attachment.asc>


More information about the ffmpeg-devel mailing list