Hi, ----- Mail original -----
[...] > ...in which I screw up and post the same patch. Here you go... > > From f06aa763f3e3593d12cc16d8017e796c9e5db3b3 Mon Sep 17 00:00:00 > 2001 > From: Rodger Combs <rodger.co...@gmail.com> > Date: Thu, 20 Nov 2014 01:47:05 -0600 > Subject: [PATCH] dashenc: Add a segment_start_number option > > --- > libavformat/dashenc.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c > index dac217e..549c7c3 100644 > --- a/libavformat/dashenc.c > +++ b/libavformat/dashenc.c > @@ -80,6 +80,7 @@ typedef struct DASHContext { > int total_duration; > char availability_start_time[100]; > char dirname[1024]; > + int segment_start_number; > } DASHContext; > > static int dash_write(void *opaque, uint8_t *buf, int buf_size) > @@ -182,10 +183,10 @@ static void dash_free(AVFormatContext *s) > > static void output_segment_list(OutputStream *os, AVIOContext *out, > DASHContext *c) > { > - int i, start_index = 0, start_number = 1; > + int i, start_index = 0, start_number = c->segment_start_number; > if (c->window_size) { > start_index = FFMAX(os->nb_segments - c->window_size, 0); > - start_number = FFMAX(os->segment_index - c->window_size, 1); > + start_number = FFMAX(os->segment_index - c->window_size, > c->segment_start_number); > } > > if (c->use_template) { > @@ -193,7 +194,7 @@ static void output_segment_list(OutputStream *os, > AVIOContext *out, DASHContext > avio_printf(out, "\t\t\t\t<SegmentTemplate timescale=\"%d\" > ", timescale); > if (!c->use_timeline) > avio_printf(out, "duration=\"%d\" ", c->last_duration); > - avio_printf(out, > "initialization=\"init-stream$RepresentationID$.m4s\" > media=\"chunk-stream$RepresentationID$-$Number%%05d$.m4s\" > startNumber=\"%d\">\n", c->use_timeline ? start_number : 1); > + avio_printf(out, > "initialization=\"init-stream$RepresentationID$.m4s\" > media=\"chunk-stream$RepresentationID$-$Number%%05d$.m4s\" > startNumber=\"%d\">\n", start_number); > Shouldn't this be "c->use_timeline ? start_number : c->segment_start_number" instead? No other remarks from me. -- Ben _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel