when use stream_loop to control the loop times, the seekable is set to 0 default, and must set duration or inpoint and outpoint into the concat list, now use this option can support use stream_loop to control the loop times of the concat list
Signed-off-by: Steven Liu <l...@chinaffmpeg.org> --- doc/demuxers.texi | 5 +++++ libavformat/concatdec.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 29a23d4..eb0e67d 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -207,6 +207,11 @@ Currently, the only conversion is adding the h264_mp4toannexb bitstream filter to H.264 streams in MP4 format. This is necessary in particular if there are resolution changes. +@item concat_seekable +If set to 1, the seek operation will be enabled, user can use stream_loop to control +loop times. +The default is 0. + @item segment_time_metadata If set to 1, every packet will contain the @var{lavf.concat.start_time} and the @var{lavf.concat.duration} packet metadata values which are the start_time and diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index 8649916..0a61af1 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -493,6 +493,9 @@ static int concat_read_header(AVFormatContext *avf) cat->seekable = 1; } + if (cat->seekable) { + cat->seekable = 1; + } cat->stream_match_mode = avf->nb_streams ? MATCH_EXACT_ID : MATCH_ONE_TO_ONE; if ((ret = open_file(avf, 0)) < 0) @@ -771,6 +774,8 @@ static const AVOption options[] = { OFFSET(auto_convert), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, DEC }, { "segment_time_metadata", "output file segment start time and duration as packet metadata", OFFSET(segment_time_metadata), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DEC }, + { "concat_seekable", "set seekable status of concat list", + OFFSET(seekable), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DEC }, { NULL } }; -- 2.10.1 (Apple Git-78) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel