From 16b0c929621f84983b83b9735ce973acb12723bc Mon Sep 17 00:00:00 2001 From: Alexandra Hájková Date: Fri, 9 Oct 2015 22:11:56 +0200 Subject: avconv: Add loop option. Signed-off-by: Anton Khirnov --- avconv_opt.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'avconv_opt.c') diff --git a/avconv_opt.c b/avconv_opt.c index a606606b02..3819993709 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -498,6 +498,9 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) ist->file_index = nb_input_files; ist->discard = 1; st->discard = AVDISCARD_ALL; + ist->nb_samples = 0; + ist->min_pts = INT64_MAX; + ist->max_pts = INT64_MIN; ist->ts_scale = 1.0; MATCH_PER_STREAM_OPT(ts_scale, dbl, ist->ts_scale, ic, st); @@ -783,6 +786,9 @@ static int open_input_file(OptionsContext *o, const char *filename) f->nb_streams = ic->nb_streams; f->rate_emu = o->rate_emu; f->accurate_seek = o->accurate_seek; + f->loop = o->loop; + f->duration = 0; + f->time_base = (AVRational){ 1, 1 }; /* check if all codec options have been used */ unused_opts = strip_specifiers(o->g->codec_opts); @@ -2391,6 +2397,8 @@ const OptionDef options[] = { { "dump_attachment", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(dump_attachment) }, "extract an attachment into a file", "filename" }, + { "loop", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_INPUT | + OPT_OFFSET, { .off = OFFSET(loop) }, "set number of times input stream shall be looped", "loop count" }, /* video options */ { "vframes", OPT_VIDEO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_video_frames }, -- cgit v1.2.3