]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg: deprecate loop_input and loop_output options
authorAnton Khirnov <anton@khirnov.net>
Sat, 18 Jun 2011 07:49:24 +0000 (09:49 +0200)
committerAnton Khirnov <anton@khirnov.net>
Fri, 8 Jul 2011 17:58:19 +0000 (19:58 +0200)
They were replaced by (de)muxer private options.

doc/ffmpeg.texi
ffmpeg.c
tests/ref/lavf/gif
tests/ref/seek/lavf_gif

index cabf39558245b338bf7943c14f0976bd48f14af1..6e7fd1390dd87cd981e307fabca2043d37000596 100644 (file)
@@ -731,9 +731,11 @@ Read input at native frame rate. Mainly used to simulate a grab device.
 @item -loop_input
 Loop over the input stream. Currently it works only for image
 streams. This option is used for automatic FFserver testing.
+This option is deprecated, use -loop.
 @item -loop_output @var{number_of_times}
 Repeatedly loop output for formats that support looping such as animated GIF
 (0 will loop the output infinitely).
+This option is deprecated, use -loop.
 @item -threads @var{count}
 Thread count.
 @item -vsync @var{parameter}
index 29d9d176194e5b7001cb9c3d24571ba8eb8c86db..d55b0d854a1c2c4631fb3c372fcd731393de2b08 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3247,7 +3247,10 @@ static int opt_input_file(const char *opt, const char *filename)
         opt_programid=0;
     }
 
-    ic->loop_input = loop_input;
+    if (loop_input) {
+        av_log(NULL, AV_LOG_WARNING, "-loop_input is deprecated, use -loop 1\n");
+        ic->loop_input = loop_input;
+    }
 
     /* Set AVCodecContext options so they will be seen by av_find_stream_info() */
     for (i = 0; i < ic->nb_streams; i++) {
@@ -3897,7 +3900,10 @@ static void opt_output_file(const char *filename)
 
     oc->preload= (int)(mux_preload*AV_TIME_BASE);
     oc->max_delay= (int)(mux_max_delay*AV_TIME_BASE);
-    oc->loop_output = loop_output;
+    if (loop_output >= 0) {
+        av_log(NULL, AV_LOG_WARNING, "-loop_output is deprecated, use -loop\n");
+        oc->loop_output = loop_output;
+    }
     oc->flags |= AVFMT_FLAG_NONBLOCK;
 
     frame_rate    = (AVRational){0, 0};
@@ -4309,8 +4315,8 @@ static const OptionDef options[] = {
     { "hex", OPT_BOOL | OPT_EXPERT, {(void*)&do_hex_dump},
       "when dumping packets, also dump the payload" },
     { "re", OPT_BOOL | OPT_EXPERT, {(void*)&rate_emu}, "read input at native frame rate", "" },
-    { "loop_input", OPT_BOOL | OPT_EXPERT, {(void*)&loop_input}, "loop (current only works with images)" },
-    { "loop_output", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&loop_output}, "number of times to loop output in formats that support looping (0 loops forever)", "" },
+    { "loop_input", OPT_BOOL | OPT_EXPERT, {(void*)&loop_input}, "deprecated, use -loop" },
+    { "loop_output", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&loop_output}, "deprecated, use -loop", "" },
     { "v", HAS_ARG, {(void*)opt_verbose}, "set ffmpeg verbosity level", "number" },
     { "target", HAS_ARG, {(void*)opt_target}, "specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\", \"dv50\", \"pal-vcd\", \"ntsc-svcd\", ...)", "type" },
     { "threads",  HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
index fa55d0e66e7b6f0a4ec05d5fce454b5caf28232d..4a4ebfb9dc562f2ff15edc3541dd05f5f62ac3c9 100644 (file)
@@ -1,3 +1,3 @@
-98968ceb210ab260a6a7af36767b94d3 *./tests/data/lavf/lavf.gif
-2906382 ./tests/data/lavf/lavf.gif
+e6089fd4ef3b9df44090ab3650bdd810 *./tests/data/lavf/lavf.gif
+2906401 ./tests/data/lavf/lavf.gif
 ./tests/data/lavf/lavf.gif CRC=0xe5605ff6
index 5da803da424b3e2e5564290a14f2a59477ac84c2..883f18761ecd000273788f8bbd3cabecfdb571f1 100644 (file)
@@ -1,4 +1,4 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:     -1 size:2906382
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:     -1 size:2906401
 ret:-EINVAL    st:-1 flags:0  ts:-1.000000
 ret:-EINVAL    st:-1 flags:1  ts: 1.894167
 ret:-EINVAL    st: 0 flags:0  ts: 0.800000