summaryrefslogtreecommitdiff
path: root/avconv_opt.c
diff options
context:
space:
mode:
authorAlexandra Hájková <alexandra.khirnova@gmail.com>2015-10-09 22:11:56 +0200
committerAnton Khirnov <anton@khirnov.net>2015-10-13 09:41:02 +0200
commit16b0c929621f84983b83b9735ce973acb12723bc (patch)
treec68a05e8279576d6c84bab7f6b76717e4ebb2971 /avconv_opt.c
parent11c5f438ff83da5040e85bfa6299f56b321d32ef (diff)
avconv: Add loop option.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'avconv_opt.c')
-rw-r--r--avconv_opt.c8
1 files changed, 8 insertions, 0 deletions
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 },