]> git.sesse.net Git - ffmpeg/blobdiff - avconv_opt.c
vc1dec: Update destination pointers in context for fields
[ffmpeg] / avconv_opt.c
index 894d6c3c7662e83acf09fac07b7e757bdf68cac0..ae9b72ee9da4778d316d50bc3e36e69c3cdc86a4 100644 (file)
@@ -61,7 +61,6 @@ float dts_delta_threshold   = 10;
 int audio_volume      = 256;
 int audio_sync_method = 0;
 int video_sync_method = VSYNC_AUTO;
-int do_deinterlace    = 0;
 int do_benchmark      = 0;
 int do_hex_dump       = 0;
 int do_pkt_dump       = 0;
@@ -820,7 +819,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
         exit(1);
     output_streams[nb_output_streams - 1] = ost;
 
-    ost->file_index = nb_output_files;
+    ost->file_index = nb_output_files - 1;
     ost->index      = idx;
     ost->st         = st;
     st->codec->codec_type = type;
@@ -904,6 +903,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
     av_dict_copy(&ost->resample_opts, o->g->resample_opts, 0);
 
     ost->pix_fmts[0] = ost->pix_fmts[1] = AV_PIX_FMT_NONE;
+    ost->last_mux_dts = AV_NOPTS_VALUE;
 
     return ost;
 }
@@ -1294,6 +1294,19 @@ static int open_output_file(OptionsContext *o, const char *filename)
         exit(1);
     }
 
+    GROW_ARRAY(output_files, nb_output_files);
+    of = av_mallocz(sizeof(*of));
+    if (!of)
+        exit(1);
+    output_files[nb_output_files - 1] = of;
+
+    of->ost_index      = nb_output_streams;
+    of->recording_time = o->recording_time;
+    of->start_time     = o->start_time;
+    of->limit_filesize = o->limit_filesize;
+    of->shortest       = o->shortest;
+    av_dict_copy(&of->opts, o->g->format_opts, 0);
+
     if (!strcmp(filename, "-"))
         filename = "pipe:";
 
@@ -1302,6 +1315,9 @@ static int open_output_file(OptionsContext *o, const char *filename)
         print_error(filename, AVERROR(ENOMEM));
         exit(1);
     }
+    of->ctx = oc;
+    if (o->recording_time != INT64_MAX)
+        oc->duration = o->recording_time;
 
     if (o->format) {
         file_oformat = av_guess_format(o->format, NULL, NULL);
@@ -1477,23 +1493,6 @@ loop_end:
         avio_close(pb);
     }
 
-    GROW_ARRAY(output_files, nb_output_files);
-    of = av_mallocz(sizeof(*of));
-    if (!of)
-        exit(1);
-    output_files[nb_output_files - 1] = of;
-
-    of->ctx            = oc;
-    of->ost_index      = nb_output_streams - oc->nb_streams;
-    of->recording_time = o->recording_time;
-    if (o->recording_time != INT64_MAX)
-        oc->duration = o->recording_time;
-    of->start_time     = o->start_time;
-    of->limit_filesize = o->limit_filesize;
-    of->shortest       = o->shortest;
-    av_dict_copy(&of->opts, o->g->format_opts, 0);
-
-
     /* check if all codec options have been used */
     unused_opts = strip_specifiers(o->g->codec_opts);
     for (i = of->ost_index; i < nb_output_streams; i++) {
@@ -1864,15 +1863,6 @@ static int opt_vsync(void *optctx, const char *opt, const char *arg)
     return 0;
 }
 
-#if FF_API_DEINTERLACE
-static int opt_deinterlace(void *optctx, const char *opt, const char *arg)
-{
-    av_log(NULL, AV_LOG_WARNING, "-%s is deprecated, use -filter:v yadif instead\n", opt);
-    do_deinterlace = 1;
-    return 0;
-}
-#endif
-
 int opt_cpuflags(void *optctx, const char *opt, const char *arg)
 {
     int flags = av_parse_cpu_flags(arg);
@@ -2013,6 +2003,7 @@ void show_help_default(const char *opt, const char *arg)
         show_help_children(avcodec_get_class(), flags);
         show_help_children(avformat_get_class(), flags);
         show_help_children(sws_get_class(), flags);
+        show_help_children(avfilter_get_class(), AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM);
     }
 }
 
@@ -2254,10 +2245,6 @@ const OptionDef options[] = {
     { "passlogfile",  OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT | OPT_SPEC |
                       OPT_OUTPUT,                                                { .off = OFFSET(passlogfiles) },
         "select two pass log file name prefix", "prefix" },
-#if FF_API_DEINTERLACE
-    { "deinterlace",  OPT_VIDEO | OPT_EXPERT ,                                   { .func_arg = opt_deinterlace },
-        "this option is deprecated, use the yadif filter instead" },
-#endif
     { "vstats",       OPT_VIDEO | OPT_EXPERT ,                                   { &opt_vstats },
         "dump video coding statistics to file" },
     { "vstats_file",  OPT_VIDEO | HAS_ARG | OPT_EXPERT ,                         { opt_vstats_file },