Merge commit 'c7603b3c243331057300337a61464e6ac4a605cb'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 30 Apr 2014 18:52:58 +0000 (20:52 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 30 Apr 2014 18:52:58 +0000 (20:52 +0200)
* commit 'c7603b3c243331057300337a61464e6ac4a605cb':
  hls: Print start_number as first sequence value

Conflicts:
libavformat/hlsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/hlsenc.c

@@@ -146,13 -146,13 +147,13 @@@ static int hls_window(AVFormatContext *
      avio_printf(hls->pb, "#EXT-X-VERSION:3\n");
      avio_printf(hls->pb, "#EXT-X-TARGETDURATION:%d\n", target_duration);
      avio_printf(hls->pb, "#EXT-X-MEDIA-SEQUENCE:%"PRId64"\n",
-                 FFMAX(0, hls->sequence - hls->nb_entries));
 -                FFMAX(hls->start_sequence, hls->sequence - hls->size));
++                FFMAX(hls->start_sequence, hls->sequence - hls->nb_entries));
  
      av_log(s, AV_LOG_VERBOSE, "EXT-X-MEDIA-SEQUENCE:%"PRId64"\n",
-            FFMAX(0, hls->sequence - hls->size));
+            FFMAX(hls->start_sequence, hls->sequence - hls->size));
  
      for (en = hls->list; en; en = en->next) {
 -        avio_printf(hls->pb, "#EXTINF:%d,\n", en->duration);
 +        avio_printf(hls->pb, "#EXTINF:%f,\n", en->duration);
          if (hls->baseurl)
              avio_printf(hls->pb, "%s", hls->baseurl);
          avio_printf(hls->pb, "%s\n", en->name);
@@@ -327,10 -324,10 +330,10 @@@ static int hls_write_trailer(struct AVF
  #define OFFSET(x) offsetof(HLSContext, x)
  #define E AV_OPT_FLAG_ENCODING_PARAM
  static const AVOption options[] = {
-     {"start_number",  "set first number in the sequence",        OFFSET(sequence),AV_OPT_TYPE_INT64,  {.i64 = 0},     0, INT64_MAX, E},
 -    {"start_number",  "first number in the sequence",            OFFSET(start_sequence),AV_OPT_TYPE_INT64,  {.i64 = 0},     0, INT64_MAX, E},
 -    {"hls_time",      "segment length in seconds",               OFFSET(time),    AV_OPT_TYPE_FLOAT,  {.dbl = 2},     0, FLT_MAX, E},
 -    {"hls_list_size", "maximum number of playlist entries",      OFFSET(size),    AV_OPT_TYPE_INT,    {.i64 = 5},     0, INT_MAX, E},
 -    {"hls_wrap",      "number after which the index wraps",      OFFSET(wrap),    AV_OPT_TYPE_INT,    {.i64 = 0},     0, INT_MAX, E},
++    {"start_number",  "set first number in the sequence",        OFFSET(start_sequence),AV_OPT_TYPE_INT64,  {.i64 = 0},     0, INT64_MAX, E},
 +    {"hls_time",      "set segment length in seconds",           OFFSET(time),    AV_OPT_TYPE_FLOAT,  {.dbl = 2},     0, FLT_MAX, E},
 +    {"hls_list_size", "set maximum number of playlist entries",  OFFSET(size),    AV_OPT_TYPE_INT,    {.i64 = 5},     0, INT_MAX, E},
 +    {"hls_wrap",      "set number after which the index wraps",  OFFSET(wrap),    AV_OPT_TYPE_INT,    {.i64 = 0},     0, INT_MAX, E},
      {"hls_base_url",  "url to prepend to each playlist entry",   OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL},  0, 0,       E},
      { NULL },
  };